InfoCard.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_InfoCard  
Version
$Id: InfoCard.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_InfoCard

Package: Zend\InfoCard
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  DIGEST_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'
URI for XML Digital Signature SHA1 Digests

Properties

>VPropertyprotected\Zend_InfoCard_Adapter_Interface $_adapter
The InfoCard Adapter to use for callbacks into the application using the component such as when storing assertions, etc.
>VPropertyprotectedArray $_keyPairs
An array of certificate pair files and optional passwords for them to search when trying to determine which certificate was used to encrypt the transient key
Details
Type
Array
>VPropertyprotected\Zend_InfoCard_Cipher_Pki_Interface $_pkiCipherObj
The instance to use to decrypt public-key encrypted data
>VPropertyprotected\Zend_InfoCard_Cipher_Symmetric_Interface $_symCipherObj
The instance to use to decrypt symmetric encrypted data

Methods

methodpublic__construct() : void

InfoCard Constructor

Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodprotected_extractSignedToken(string $strXmlToken) : string

Extracts the Signed Token from an EncryptedData block

Parameters
NameTypeDescription
$strXmlTokenstring

The EncryptedData XML block

Returns
TypeDescription
stringThe XML of the Signed Token inside of the EncryptedData block
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodprotected_findCertifiatePairByDigest(string $digest, string $digestMethod = self::DIGEST_SHA1) : mixed

Find a certificate pair based on a digest of its public key / certificate file

Parameters
NameTypeDescription
$digeststring

The digest value of the public key wanted in binary form

$digestMethodstring

The URI of the digest method used to calculate the digest

Returns
TypeDescription
mixedThe Key ID of the matching certificate pair or false if not found
methodprotected_getPublicKeyDigest(string $key_id, string $digestMethod = self::DIGEST_SHA1) : string

Retrieve the digest of a given public key / certificate using the provided digest method

Parameters
NameTypeDescription
$key_idstring

The certificate key id in the component

$digestMethodstring

The URI of the digest method to use (default SHA1)

Returns
TypeDescription
stringThe digest value in binary format
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicaddCertificatePair(string $private_key_file, string $public_key_file, string $type = \Zend_InfoCard_Cipher::ENC_RSA_OAEP_MGF1P, string $password = null) : string

Add a Certificate Pair to the list of certificates searched by the component

Parameters
NameTypeDescription
$private_key_filestring

The path to the private key file for the pair

$public_key_filestring

The path to the certificate / public key for the pair

$typestring

(optional) The URI for the type of key pair this is (default RSA with OAEP padding)

$passwordstring

(optional) The password for the private key file if necessary

Returns
TypeDescription
stringA key ID representing this key pair in the component
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicgetAdapter() : \Zend_InfoCard_Adapter_Interface

Retrieves the adapter used for callbacks into the application using the component.

If no adapter was set then an instance of Zend_InfoCard_Adapter_Default is used

Returns
TypeDescription
\Zend_InfoCard_Adapter_InterfaceThe Adapter instance
methodpublicgetCertificatePair(string $key_id) : array

Return a Certificate Pair from a key ID

Parameters
NameTypeDescription
$key_idstring

The Key ID of the certificate pair in the component

Returns
TypeDescription
arrayAn array containing the path to the private/public key files, the type URI and the password if provided
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicgetPkiCipherObject() : \Zend_InfoCard_Cipher_Pki_Interface

Gets the Public Key Cipher object used in this instance

methodpublicgetSymCipherObject() : \Zend_InfoCard_Cipher_Symmetric_Interface

Get the Symmetric Cipher Object used in this instance

methodpublicprocess(string $strXmlToken) : \Zend_Infocard_Claims

Process an input Infomation Card EncryptedData block sent from the client, validate it, and return the claims contained within it on success or an error message on error

Parameters
NameTypeDescription
$strXmlTokenstring

The XML token sent to the server from the client

Returns
TypeDescription
\Zend_Infocard_ClaimsThe Claims object containing the claims, or any errors which occurred
methodpublicremoveCertificatePair(string $key_id) : \Zend_InfoCard

Remove a Certificate Pair by Key ID from the search list

Parameters
NameTypeDescription
$key_idstring

The Certificate Key ID returned from adding the certificate pair

Returns
TypeDescription
\Zend_InfoCard
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicsetAdapter(\Zend_InfoCard_Adapter_Interface $a) : \Zend_InfoCard

Sets the adapter uesd for callbacks into the application using the component, used when doing things such as storing / retrieving assertions, etc.

Parameters
NameTypeDescription
$a\Zend_InfoCard_Adapter_Interface

The Adapter instance

Returns
TypeDescription
\Zend_InfoCardThe instnace
methodpublicsetPkiCipherObject(\Zend_InfoCard_Cipher_Pki_Interface $cipherObj) : \Zend_InfoCard

Sets the Public Key Cipher Object used in this instance

Parameters
NameTypeDescription
$cipherObj\Zend_InfoCard_Cipher_Pki_Interface
Returns
TypeDescription
\Zend_InfoCard
methodpublicsetSymCipherObject(\Zend_InfoCard_Cipher_Symmetric_Interface $cipherObj) : \Zend_InfoCard

Sets the Symmetric Cipher Object used in this instance

Parameters
NameTypeDescription
$cipherObj\Zend_InfoCard_Cipher_Symmetric_Interface
Returns
TypeDescription
\Zend_InfoCard
Documentation was generated by phpDocumentor 2.0.0a12.