ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_SigningEncoder Class Reference
+ Inheritance diagram for Auth_OpenID_SigningEncoder:
+ Collaboration diagram for Auth_OpenID_SigningEncoder:

Public Member Functions

 Auth_OpenID_SigningEncoder ($signatory)
 encode ($response)
 Sign an Auth_OpenID_ServerResponse and return an Auth_OpenID_WebResponse.

Additional Inherited Members

- Data Fields inherited from Auth_OpenID_Encoder
 $responseFactory = 'Auth_OpenID_WebResponse'

Detailed Description

Definition at line 1484 of file Server.php.

Member Function Documentation

Auth_OpenID_SigningEncoder::Auth_OpenID_SigningEncoder (   $signatory)

Definition at line 1486 of file Server.php.

{
$this->signatory = $signatory;
}
Auth_OpenID_SigningEncoder::encode (   $response)

Sign an Auth_OpenID_ServerResponse and return an Auth_OpenID_WebResponse.

Reimplemented from Auth_OpenID_Encoder.

Definition at line 1495 of file Server.php.

References Auth_OpenID_OPENID_NS.

{
// the isinstance is a bit of a kludge... it means there isn't
// really an adapter to make the interfaces quite match.
if (!is_a($response, 'Auth_OpenID_ServerError') &&
$response->needsSigning()) {
if (!$this->signatory) {
return new Auth_OpenID_ServerError(null,
"Must have a store to sign request");
}
if ($response->fields->hasKey(Auth_OpenID_OPENID_NS, 'sig')) {
return new Auth_OpenID_AlreadySigned($response);
}
$response = $this->signatory->sign($response);
}
return parent::encode($response);
}

The documentation for this class was generated from the following file: