Auth_OpenID_AX_FetchRequest
extends Auth_OpenID_AX_Message
in package
An attribute exchange 'fetch_request' message. This message is sent by a relying party when it wishes to obtain attributes about the subject of an OpenID authentication request.
Table of Contents
- $mode : mixed
- mode: The type of this attribute exchange message. This must be overridden in subclasses.
- $ns_alias : mixed
- $ns_uri : mixed
- ns_uri: The namespace to which to add the arguments for this extension
- $update_url : string
- update_url: A URL that will accept responses for this attribute exchange request, even in the absence of the user who made this request.
- $requested_attributes : array<string|int, mixed>
- requested_attributes: The attributes that have been requested thus far, indexed by the type URI.
- __construct() : mixed
- _checkMode() : Auth_OpenID_AX_Error|bool
- Return Auth_OpenID_AX_Error if the mode in the attribute exchange arguments does not match what is expected for this class; true otherwise.
- _newArgs() : mixed
- Return a set of attribute exchange arguments containing the basic information that must be in every attribute exchange message.
- add() : bool|Auth_OpenID_AX_Error
- Add an attribute to this attribute exchange request.
- contains() : bool
- Is the given type URI present in this fetch_request?
- fromOpenIDRequest() : Auth_OpenID_AX_FetchRequest|Auth_OpenID_AX_Error
- Extract a FetchRequest from an OpenID message
- getExtensionArgs() : Auth_OpenID_AX_Error|Auth_OpenID_AX_FetchRequest
- Get the serialized form of this attribute fetch request.
- getRequiredAttrs() : array<string|int, mixed>
- Get the type URIs for all attributes that have been marked as required.
- iterAttrs() : mixed
- Iterate over the AttrInfo objects that are contained in this fetch_request.
- iterTypes() : mixed
- parseExtensionArgs() : Auth_OpenID_AX_Error|bool
- Given attribute exchange arguments, populate this FetchRequest.
- toMessage() : null
- Add the arguments from this extension to the provided message.
Properties
$mode
mode: The type of this attribute exchange message. This must be overridden in subclasses.
public
mixed
$mode
= 'fetch_request'
$ns_alias
public
mixed
$ns_alias
= \null
$ns_uri
ns_uri: The namespace to which to add the arguments for this extension
public
mixed
$ns_uri
= \null
$update_url
update_url: A URL that will accept responses for this attribute exchange request, even in the absence of the user who made this request.
public
string
$update_url
= ''
$requested_attributes
requested_attributes: The attributes that have been requested thus far, indexed by the type URI.
private
array<string|int, mixed>
$requested_attributes
= []
Methods
__construct()
public
__construct([mixed $update_url = null ]) : mixed
Parameters
- $update_url : mixed = null
Return values
mixed —_checkMode()
Return Auth_OpenID_AX_Error if the mode in the attribute exchange arguments does not match what is expected for this class; true otherwise.
public
_checkMode(array<string|int, mixed> $ax_args) : Auth_OpenID_AX_Error|bool
Parameters
- $ax_args : array<string|int, mixed>
Tags
Return values
Auth_OpenID_AX_Error|bool —_newArgs()
Return a set of attribute exchange arguments containing the basic information that must be in every attribute exchange message.
public
_newArgs() : mixed
Tags
Return values
mixed —add()
Add an attribute to this attribute exchange request.
public
add(mixed $attribute) : bool|Auth_OpenID_AX_Error
Parameters
- $attribute : mixed
Return values
bool|Auth_OpenID_AX_Error —contains()
Is the given type URI present in this fetch_request?
public
contains(string $type_uri) : bool
Parameters
- $type_uri : string
Return values
bool —fromOpenIDRequest()
Extract a FetchRequest from an OpenID message
public
static fromOpenIDRequest(Auth_OpenID_Request $request) : Auth_OpenID_AX_FetchRequest|Auth_OpenID_AX_Error
Parameters
- $request : Auth_OpenID_Request
-
The OpenID request containing the attribute fetch request
Return values
Auth_OpenID_AX_FetchRequest|Auth_OpenID_AX_Error —getExtensionArgs()
Get the serialized form of this attribute fetch request.
public
getExtensionArgs([Auth_OpenID_Request|null $request = null ]) : Auth_OpenID_AX_Error|Auth_OpenID_AX_FetchRequest
Parameters
- $request : Auth_OpenID_Request|null = null
Return values
Auth_OpenID_AX_Error|Auth_OpenID_AX_FetchRequest —The fetch request message parameters
getRequiredAttrs()
Get the type URIs for all attributes that have been marked as required.
public
getRequiredAttrs() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of the type URIs for attributes that have been marked as required.
iterAttrs()
Iterate over the AttrInfo objects that are contained in this fetch_request.
public
iterAttrs() : mixed
Return values
mixed —iterTypes()
public
iterTypes() : mixed
Return values
mixed —parseExtensionArgs()
Given attribute exchange arguments, populate this FetchRequest.
public
parseExtensionArgs(array<string|int, mixed> $ax_args) : Auth_OpenID_AX_Error|bool
Parameters
- $ax_args : array<string|int, mixed>
Return values
Auth_OpenID_AX_Error|bool —if the data to be parsed does not follow the attribute exchange specification. At least when 'if_available' or 'required' is not specified for a particular attribute type. Returns true otherwise.
toMessage()
Add the arguments from this extension to the provided message.
public
toMessage(Auth_OpenID_Message $message[, Auth_OpenID_Request $request = null ]) : null
Returns the message with the extension arguments added.
Parameters
- $message : Auth_OpenID_Message
- $request : Auth_OpenID_Request = null