ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_PAPE_Request Class Reference

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

+ Inheritance diagram for Auth_OpenID_PAPE_Request:
+ Collaboration diagram for Auth_OpenID_PAPE_Request:

Public Member Functions

 Auth_OpenID_PAPE_Request ($preferred_auth_policies=null, $max_auth_age=null)
 addPolicyURI ($policy_uri)
 Add an acceptable authentication policy URI to this request.
 getExtensionArgs ()
 Get the string arguments that should be added to an OpenID message for this extension.
 parseExtensionArgs ($args)
 Set the state of this request to be that expressed in these PAPE arguments.
 preferredTypes ($supported_types)
 Given a list of authentication policy URIs that a provider supports, this method returns the subsequence of those types that are preferred by the relying party.
- 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 fromOpenIDRequest ($request)
 Instantiate a Request object from the arguments in a checkid_* OpenID message.

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 request, sent from a relying party to a provider.

preferred_auth_policies: The authentication policies that the relying party prefers

max_auth_age: The maximum time, in seconds, that the relying party wants to allow to have elapsed before the user must re-authenticate

Definition at line 30 of file PAPE.php.

Member Function Documentation

Auth_OpenID_PAPE_Request::addPolicyURI (   $policy_uri)

Add an acceptable authentication policy URI to this request.

This method is intended to be used by the relying party to add acceptable authentication types to the request.

policy_uri: The identifier for the preferred type of authentication.

Definition at line 55 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Request().

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

+ Here is the caller graph for this function:

Auth_OpenID_PAPE_Request::Auth_OpenID_PAPE_Request (   $preferred_auth_policies = null,
  $max_auth_age = null 
)

Definition at line 35 of file PAPE.php.

References $ns_alias, $ns_uri, addPolicyURI(), and Auth_OpenID_PAPE_NS_URI.

Referenced by fromOpenIDRequest().

{
var $ns_alias = 'pape';
function Auth_OpenID_PAPE_Request($preferred_auth_policies=null,
$max_auth_age=null)
{
if ($preferred_auth_policies === null) {
$preferred_auth_policies = array();

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Auth_OpenID_PAPE_Request::fromOpenIDRequest (   $request)
static

Instantiate a Request object from the arguments in a checkid_* OpenID message.

Definition at line 80 of file PAPE.php.

References Auth_OpenID_PAPE_NS_URI, and Auth_OpenID_PAPE_Request().

{
$args = $request->message->getArgs(Auth_OpenID_PAPE_NS_URI);
if ($args === null || $args === array()) {
return null;

+ Here is the call graph for this function:

Auth_OpenID_PAPE_Request::getExtensionArgs ( )

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

Reimplemented from Auth_OpenID_Extension.

Definition at line 62 of file PAPE.php.

{
$this->preferred_auth_policies[] = $policy_uri;
}
}
function getExtensionArgs()
{
$ns_args = array(
'preferred_auth_policies' =>
implode(' ', $this->preferred_auth_policies)
);
if ($this->max_auth_age !== null) {
Auth_OpenID_PAPE_Request::parseExtensionArgs (   $args)

Set the state of this request to be that expressed in these PAPE arguments.

Parameters
args,:The PAPE arguments without a namespace

Definition at line 99 of file PAPE.php.

: The PAPE arguments without a namespace
*/
function parseExtensionArgs($args)
{
// preferred_auth_policies is a space-separated list of policy
// URIs
$this->preferred_auth_policies = array();
$policies_str = Auth_OpenID::arrayGet($args, 'preferred_auth_policies');
if ($policies_str) {
foreach (explode(' ', $policies_str) as $uri) {
if (!in_array($uri, $this->preferred_auth_policies)) {
$this->preferred_auth_policies[] = $uri;
}
}
}
// max_auth_age is base-10 integer number of seconds
$max_auth_age_str = Auth_OpenID::arrayGet($args, 'max_auth_age');
if ($max_auth_age_str) {
Auth_OpenID_PAPE_Request::preferredTypes (   $supported_types)

Given a list of authentication policy URIs that a provider supports, this method returns the subsequence of those types that are preferred by the relying party.

Parameters
supported_types,:A sequence of authentication policy type URIs that are supported by a provider
Returns
array The sub-sequence of the supported types that are preferred by the relying party. This list will be ordered in the order that the types appear in the supported_types sequence, and may be empty if the provider does not prefer any of the supported authentication types.

Definition at line 137 of file PAPE.php.

{
$result = array();
foreach ($supported_types as $st) {
if (in_array($st, $this->preferred_auth_policies)) {

Field Documentation

Auth_OpenID_PAPE_Request::$ns_alias = 'pape'

Definition at line 32 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Request().

Auth_OpenID_PAPE_Request::$ns_uri = Auth_OpenID_PAPE_NS_URI

Definition at line 33 of file PAPE.php.

Referenced by Auth_OpenID_PAPE_Request().


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