In this example the Moria2-enabled service initiates a direct
non-interactive authentication session. "Non-interactive" means that
this authentication method does not require any input from the user;
the service must retrieve the user's credentials and forward them to
Moria2. This also eliminates any need for HTTP redirects during
authentication. The service requests the user attribute
eduPersonAffiliation, and authenticates the user with
username
username@my.org
and password password
.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:directNonInteractiveAuthentication xmlns:m="http://v2_0.webservices.moria.feide.no" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <attributes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="m0:string[1]"> <m0:item0 xsi:type="xsd:string">eduPersonAffiliation</m0:item0> </attributes> <username xsi:type="xsd:string">username@my.org</username> <password xsi:type="xsd:string">password</password> </m:directNonInteractiveAuthentication> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Moria2 has checked the service's authorization data and found the above request to be valid. The requested multi-valued attribute eduPersonAffiliation is returned.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:directNonInteractiveAuthenticationResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://v2_0.webservices.moria.feide.no"> <ns1:directNonInteractiveAuthenticationReturn xsi:type="soapenc:Array" soapenc:arrayType="ns2:Attribute[1]" xmlns:ns2="https://login.feide.no/moria/v2_0/Authentication" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item href="#id0"/> </ns1:directNonInteractiveAuthenticationReturn> </ns1:directNonInteractiveAuthenticationResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Attribute" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="https://login.feide.no/moria/v2_0/Authentication"> <name xsi:type="xsd:string">eduPersonAffiliation</name> <values xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[4]"> <item>employee</item> <item>staff</item> <item>student</item> <item>test user</item> </values> </multiRef> </soapenv:Body> </soapenv:Envelope>