46 $nameidFormat =
'http://schemas.xmlsoap.org/claims/UPN';
50 <wst:RequestSecurityTokenResponse xmlns:wst=
"http://schemas.xmlsoap.org/ws/2005/02/trust">
51 <wst:RequestedSecurityToken>
52 <saml:Assertion Issuer=
"$issuer" IssueInstant=
"$issueInstant" AssertionID=
"$assertionID" MinorVersion=
"1" MajorVersion=
"1" xmlns:saml=
"urn:oasis:names:tc:SAML:1.0:assertion">
53 <saml:Conditions
NotOnOrAfter=
"$assertionExpire" NotBefore=
"$notBefore">
54 <saml:AudienceRestrictionCondition>
55 <saml:Audience>
$target</saml:Audience>
56 </saml:AudienceRestrictionCondition>
58 <saml:AuthenticationStatement AuthenticationMethod=
"urn:oasis:names:tc:SAML:1.0:am:unspecified" AuthenticationInstant=
"$issueInstant">
60 <saml:NameIdentifier Format=
"$nameidFormat">
$nameid</saml:NameIdentifier>
62 </saml:AuthenticationStatement>
63 <saml:AttributeStatement>
65 <saml:NameIdentifier Format=
"$nameidFormat">
$nameid</saml:NameIdentifier>
76 if ((!isset($value)) || ($value ===
'')) {
79 $value = htmlspecialchars($value);
82 <saml:Attribute AttributeNamespace=
"$namespace" AttributeName=
"$name">
83 <saml:AttributeValue>$value</saml:AttributeValue>
91 </saml:AttributeStatement>
93 </wst:RequestedSecurityToken>
94 <wsp:AppliesTo xmlns:wsp=
"http://schemas.xmlsoap.org/ws/2004/09/policy">
95 <wsa:EndpointReference xmlns:wsa=
"http://schemas.xmlsoap.org/ws/2004/08/addressing">
96 <wsa:Address>
$target</wsa:Address>
97 </wsa:EndpointReference>
99 </wst:RequestSecurityTokenResponse>
if($err=$client->getError()) $namespace
static generateID()
Generate a random identifier, ID_LENGTH bytes long.
static getAttributeNamespace($name, $defaultns)
Extract an attribute's namespace, or revert to default.
static generateTimestamp($instant=null)
This function generates a timestamp on the form used by the SAML protocols.
if(array_key_exists('yes', $_REQUEST)) $attributes
$sc SubjectConfirmationData NotOnOrAfter