Binding
Messages are transmitted via POST Binding. The AuthnRequest is posted to https://broker.hin.ch/realms/HINBroker/protocol/saml. To do this, the application provider returns an XHTML form to the user’s browser, which is automatically submitted via JavaScript. The form contains the Base64-encoded AuthnRequest.
Transmission of SAML Messages
SP-generated HTML Form
The SAML request is Base64-encoded and inserted in the SAMLRequest field:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>POST data</title>
</head>
<body onload="document.getElementsByTagName('input')[0].click();">
<form method="post" action="https://broker.hin.ch/realms/HINBroker/protocol/saml">
<input style="display:none;" type="submit">
<input name="SAMLRequest" value="@base64 encoded request@" type="hidden">
<button type="submit" class="btn">Submit</button>
</form>
</body>
</html>
@base64 encoded request@: Placeholder for the encoded request.
IDP-generated HTML Form
The SAML response is Base64-encoded and inserted in the SAMLResponse field:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Nevis Navajo Generated Form</title>
<meta name="robots" content="noindex">
</head>
<body onload="document.forms[0].submit();">
<form action="https://aak.local/simplesaml/module.php/saml/sp/saml2-acs.php/fed.hin.ch_Post_aak.local"
method="post" enctype="application/x-www-form-urlencoded">
<div>
<input name="SAMLResponse" value="@base64 encoded response@" type="hidden">
</div>
<div><input value="Continue" type="submit"></div>
</form>
</body>
</html>
@base64 encoded response@: Placeholder for the encoded response.