ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_PAPE_Response Class Reference

A Provider Authentication Policy response, sent from a provider to a relying party. More...

+ Inheritance diagram for Auth_OpenID_PAPE_Response:
+ Collaboration diagram for Auth_OpenID_PAPE_Response:

Public Member Functions

 Auth_OpenID_PAPE_Response ($auth_policies=null, $auth_time=null, $nist_auth_level=null)
 addPolicyURI ($policy_uri)
 Add a authentication policy to this response.
 parseExtensionArgs ($args, $strict=false)
 Parse the provider authentication policy arguments into the internal state of this object.
 getExtensionArgs ()
 Get the string arguments that should be added to an OpenID message for this extension.
- Public Member Functions inherited from Auth_OpenID_Extension
 toMessage ($message)
 Add the arguments from this extension to the provided message.

Static Public Member Functions

static fromSuccessResponse ($success_response)
 Create an Auth_OpenID_PAPE_Response object from a successful OpenID library response.

Data Fields

 $ns_alias = 'pape'
 $ns_uri = Auth_OpenID_PAPE_NS_URI
- Data Fields inherited from Auth_OpenID_Extension
 $ns_uri = null
 ns_uri: The namespace to which to add the arguments for this extension
 $ns_alias = null

Detailed Description

A Provider Authentication Policy response, sent from a provider to a relying party.

Definition at line 154 of file PAPE.php.

Member Function Documentation

Auth_OpenID_PAPE_Response::addPolicyURI (   $policy_uri)

Add a authentication policy to this response.

This method is intended to be used by the provider to add a policy that the provider conformed to when authenticating the user.

Parameters
policy_uri,:The identifier for the preferred type of authentication.

Definition at line 182 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Response().

: The identifier for the preferred type of
* authentication.
*/
function addPolicyURI($policy_uri)

+ Here is the caller graph for this function:

Auth_OpenID_PAPE_Response::Auth_OpenID_PAPE_Response (   $auth_policies = null,
  $auth_time = null,
  $nist_auth_level = null 
)

Definition at line 159 of file PAPE.php.

References $ns_alias, $ns_uri, $result, addPolicyURI(), Auth_OpenID\arrayGet(), Auth_OpenID_PAPE_NS_URI, fromSuccessResponse(), Auth_OpenID\intval(), PAPE_TIME_VALIDATOR, and parseExtensionArgs().

{
var $ns_alias = 'pape';
function Auth_OpenID_PAPE_Response($auth_policies=null, $auth_time=null,
$nist_auth_level=null)
{
if ($auth_policies) {
$this->auth_policies = $auth_policies;
} else {
$this->auth_policies = array();

+ Here is the call graph for this function:

static Auth_OpenID_PAPE_Response::fromSuccessResponse (   $success_response)
static

Create an Auth_OpenID_PAPE_Response object from a successful OpenID library response.

Parameters
success_response$success_responseA SuccessResponse from Auth_OpenID_Consumer::complete()
Returns
: A provider authentication policy response from the data that was supplied with the id_res response.

Definition at line 199 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Response().

: A provider authentication policy response from the
* data that was supplied with the id_res response.
*/
static function fromSuccessResponse($success_response)
{
// PAPE requires that the args be signed.
$args = $success_response->getSignedNS(Auth_OpenID_PAPE_NS_URI);
if ($args === null || $args === array()) {
return null;
}
$result = $obj->parseExtensionArgs($args);
if ($result === false) {

+ Here is the caller graph for this function:

Auth_OpenID_PAPE_Response::getExtensionArgs ( )

Get the string arguments that should be added to an OpenID message for this extension.

Reimplemented from Auth_OpenID_Extension.

Definition at line 268 of file PAPE.php.

{
$ns_args = array();
if (count($this->auth_policies) > 0) {
$ns_args['auth_policies'] = implode(' ', $this->auth_policies);
} else {
$ns_args['auth_policies'] = 'none';
}
if ($this->nist_auth_level !== null) {
if (!in_array($this->nist_auth_level, range(0, 4), true)) {
return false;
}
$ns_args['nist_auth_level'] = strval($this->nist_auth_level);
}
if ($this->auth_time !== null) {
if (!preg_match(PAPE_TIME_VALIDATOR, $this->auth_time)) {
return false;
}
Auth_OpenID_PAPE_Response::parseExtensionArgs (   $args,
  $strict = false 
)

Parse the provider authentication policy arguments into the internal state of this object.

Parameters
args,:unqualified provider authentication policy arguments
strict,:Whether to return false when bad data is encountered
Returns
null The data is parsed into the internal fields of this object.

Definition at line 232 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Response().

{
$policies_str = Auth_OpenID::arrayGet($args, 'auth_policies');
if ($policies_str && $policies_str != "none") {
$this->auth_policies = explode(" ", $policies_str);
}
$nist_level_str = Auth_OpenID::arrayGet($args, 'nist_auth_level');
if ($nist_level_str !== null) {
$nist_level = Auth_OpenID::intval($nist_level_str);
if ($nist_level === false) {
if ($strict) {
return false;
} else {
$nist_level = null;
}
}
if (0 <= $nist_level && $nist_level < 5) {
$this->nist_auth_level = $nist_level;
} else if ($strict) {
return false;
}
}
$auth_time = Auth_OpenID::arrayGet($args, 'auth_time');
if ($auth_time !== null) {
if (preg_match(PAPE_TIME_VALIDATOR, $auth_time)) {
$this->auth_time = $auth_time;

+ Here is the caller graph for this function:

Field Documentation

Auth_OpenID_PAPE_Response::$ns_alias = 'pape'

Definition at line 156 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Response().

Auth_OpenID_PAPE_Response::$ns_uri = Auth_OpenID_PAPE_NS_URI

Definition at line 157 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Response().


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