Class SAML

Description

* PHP versions 4 and 5 * * LICENSE: See the COPYING file included in this distribution.

* * @package OpenID * @author Santosh Subramanian <subrasan@cs.sunysb.edu> * @author Shishir Randive <srandive@cs.sunysb.edu> * Stony Brook University. * largely derived from * Copyright (C) 2007 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Located in /contrib/signed_assertions/SAML.php (line 28)


	
			
Method Summary
 string createSamlAssertion (string $authenticatedUser, string $notBefore, string $notOnOrAfter, string $rsadsa,  $acsURI,  $attribute,  $value,  $assertionTemplate, string $requestID, string $destination)
 string samlCreateId ()
 string samlGetDateTime (timestamp $timestamp)
 string signAssertion (string $responseXmlString,  $privKey, string $cert, string $priKey)
 bool validSamlDateFormat (string $samlDate)
 string verifyAssertion (string $responseXmlString, string $rootcert)
Methods
createSamlAssertion (line 43)

Returns a SAML response with various elements filled in.

  • return: XML SAML response.
string createSamlAssertion (string $authenticatedUser, string $notBefore, string $notOnOrAfter, string $rsadsa,  $acsURI,  $attribute,  $value,  $assertionTemplate, string $requestID, string $destination)
  • string $authenticatedUser: The OpenId of the user
  • string $notBefore: The ISO 8601 formatted date before which the
  • string $notOnOrAfter: The ISO 8601 formatted data after which the
  • string $rsadsa: 'rsa' if the response will be signed with RSA keys,
  • string $requestID: The ID of the request we're responding to
  • string $destination: The ACS URL that the response is submitted to
  • $acsURI
  • $attribute
  • $value
  • $assertionTemplate
samlCreateId (line 175)

Creates a 40-character string containing 160-bits of pseudorandomness.

  • return: Containing pseudorandomness of 160 bits
string samlCreateId ()
samlGetDateTime (line 191)

Returns a unix timestamp in xsd:dateTime format.

string samlGetDateTime (timestamp $timestamp)
  • timestamp $timestamp: int UNIX Timestamp to convert to xsd:dateTime ISO 8601 format.
signAssertion (line 66)

Signs a SAML response with the given private key, and embeds the public key.

  • return: Signed Assertion
string signAssertion (string $responseXmlString,  $privKey, string $cert, string $priKey)
  • string $responseXmlString: The unsigned Assertion which will be signed
  • string $priKey: Private key to sign the certificate
  • string $cert: Public key certificate of signee
  • $privKey
validSamlDateFormat (line 201)

Attempts to check whether a SAML date is valid. Returns true or false.

bool validSamlDateFormat (string $samlDate)
  • string $samlDate
verifyAssertion (line 109)

Verify a saml response with the given public key.

  • return: Signed SAML response
string verifyAssertion (string $responseXmlString, string $rootcert)
  • string $responseXmlString: Response to sign
  • string $rootcert: trusted public key certificate

Documentation generated on Thu, 29 Jul 2010 13:59:14 -0700 by phpDocumentor 1.4.3