In this example the Moria2-enabled service retrieves the previously
requested (through initiateAuthentication
; see separate
SOAP example)
attributes from Moria2.
The session ID sent as parameter is the substring session included in the URL
http://www.service.org/?STARTID=sessionSTOPID
initiateAuthentication
example when
the user is redirected back to the service after successful
authentication.
<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"> <SOAP-ENV:Body> <m:getUserAttributes xmlns:m="http://v2_0.webservices.moria.feide.no" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <serviceTicket xsi:type="xsd:string">MDA3AAABAU2f8til3qYaexoDNWirZ94ozBGVyVgF8xN2cAKy1XKMP9dvGZe4YR-7Lg3lOIJtvft4O7E</serviceTicket> </m:getUserAttributes> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Following authentication, Moria2 was able to read the requested attributes; these are now returned. Note the difference between the single-valued tgt attribute and the multi-valued eduPersonAffiliation attribute.
<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:getUserAttributesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://v2_0.webservices.moria.feide.no"> <ns1:getUserAttributesReturn xsi:type="soapenc:Array" soapenc:arrayType="ns2:Attribute[2]" xmlns:ns2="https://login.feide.no/moria/v2_0/Authentication" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item href="#id0"/> <item href="#id1"/> </ns1:getUserAttributesReturn> </ns1:getUserAttributesResponse> <multiRef id="id1" 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> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Attribute" xmlns:ns4="https://login.feide.no/moria/v2_0/Authentication" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <name xsi:type="xsd:string">tgt</name> <values xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[1]"> <item>MDA3AAABAVvsT52YvxxKM3yKATVbQtD*sREX80W7cUNXLIvPtvgIYrUc7IjNp9fXQkFpR3fRqkDi0T4</item> </values> </multiRef> </soapenv:Body> </soapenv:Envelope>