initiateAuthentication SOAP Example

Client SOAP Request

In this example the Moria2-enabled service initiates an authentication session, requesting the user attributes tgt and eduPersonAffiliation. Note that the service does not force the user to to go through interactive authentication, that is, does not deny the use of SSO; this would result in Moria2 not returning the tgt (ticket granting ticket) attribute, which is exclusively used for SSO. Once the user has been authenticated by Moria2, the user should be redirected back to the service URL

http://www.service.org/STARTIDsessionSTOPID
where session is the session ID assigned to this authentication attempt by Moria2. This session ID may then be used by the service to retrieve the requested attributes.

<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:initiateAuthentication 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">tgt</m0:item0>
				<m0item0 xsi:type="xsd:string">eduPersonAffiliation</m0item0>
			</attributes>
			<returnURLPrefix xsi:type="xsd:string">http://www.service.org/?STARTID=</returnURLPrefix>
			<returnURLPostfix xsi:type="xsd:string">STOPID</returnURLPostfix>
			<forceInteractiveAuthentication xsi:type="xsd:boolean">1</forceInteractiveAuthentication>
		</m:initiateAuthentication>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Moria2 SOAP Reply

Moria2 has checked the service's authorization data and found the above request to be valid. The service should now redirect the user to the URL

http://localhost:8080/moria/Login?moriaID=MDA3AAABAU2EOeFxmQe9pqmhMwGXlj2KKLMJEwtTU9VtNauOPK7inGB25RYaFIhLyUBVrPJRe6LYLYo
for authentication. Note that in this example Moria2 is deployed locally.

<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:initiateAuthenticationResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://v2_0.webservices.moria.feide.no">
			<ns1:initiateAuthenticationReturn xsi:type="xsd:string">http://localhost:8080/moria/Login?moriaID=MDA3AAABAU2EOeFxmQe9pqmhMwGXlj2KKLMJEwtTU9VtNauOPK7inGB25RYaFIhLyUBVrPJRe6LYLYo</ns1:initiateAuthenticationReturn>
		</ns1:initiateAuthenticationResponse>
	</soapenv:Body>
</soapenv:Envelope>