JanRain OpenID Library

Auth_OpenID_SRegResponse extends Auth_OpenID_SRegBase
in package

Represents the data returned in a simple registration response inside of an OpenID C{id_res} response. This object will be created by the OpenID server, added to the C{id_res} response object, and then extracted from the C{id_res} message by the Consumer.

Table of Contents

$data  : array<string|int, mixed>
$ns_alias  : string
$ns_uri  : mixed
ns_uri: The namespace to which to add the arguments for this extension
__construct()  : mixed
_getSRegNS()  : mixed|null|string
Extract the simple registration namespace URI from the given OpenID message. Handles OpenID 1 and 2, as well as both sreg namespace URIs found in the wild, as well as missing namespace definitions (for OpenID 1)
contents()  : mixed
extractResponse()  : Auth_OpenID_SRegResponse
Take a C{L{SRegRequest}} and a dictionary of simple registration values and create a C{L{SRegResponse}} object containing that data.
fromSuccessResponse()  : Auth_OpenID_SRegResponse|null
Create a C{L{SRegResponse}} object from a successful OpenID library response (C{L{openid.consumer.consumer.SuccessResponse}}) response message
get()  : mixed
getExtensionArgs()  : null
Get the string arguments that should be added to an OpenID message for this extension.
toMessage()  : null
Add the arguments from this extension to the provided message.

Properties

$data

public array<string|int, mixed> $data = []

$ns_alias

public string $ns_alias = 'sreg'

$ns_uri

ns_uri: The namespace to which to add the arguments for this extension

public mixed $ns_uri = \null

Methods

__construct()

public __construct([mixed $data = null ][, mixed $sreg_ns_uri = Auth_OpenID_SREG_NS_URI ]) : mixed
Parameters
$data : mixed = null
$sreg_ns_uri : mixed = Auth_OpenID_SREG_NS_URI
Return values
mixed

_getSRegNS()

Extract the simple registration namespace URI from the given OpenID message. Handles OpenID 1 and 2, as well as both sreg namespace URIs found in the wild, as well as missing namespace definitions (for OpenID 1)

public static _getSRegNS(Auth_OpenID_Message $message) : mixed|null|string

$message: The OpenID message from which to parse simple registration fields. This may be a request or response message.

Returns the sreg namespace URI for the supplied message. The message may be modified to define a simple registration namespace.

Parameters
$message : Auth_OpenID_Message
Tags
access

private

Return values
mixed|null|string

contents()

public contents() : mixed
Return values
mixed

extractResponse()

Take a C{L{SRegRequest}} and a dictionary of simple registration values and create a C{L{SRegResponse}} object containing that data.

public static extractResponse(Auth_OpenID_SRegRequest $request, array<string|int, mixed> $data) : Auth_OpenID_SRegResponse

request: The simple registration request object

data: The simple registration data for this response, as a dictionary from unqualified simple registration field name to string (unicode) value. For instance, the nickname should be stored under the key 'nickname'.

Parameters
$request : Auth_OpenID_SRegRequest
$data : array<string|int, mixed>
Return values
Auth_OpenID_SRegResponse

fromSuccessResponse()

Create a C{L{SRegResponse}} object from a successful OpenID library response (C{L{openid.consumer.consumer.SuccessResponse}}) response message

public static fromSuccessResponse(Auth_OpenID_SuccessResponse $success_response[, bool $signed_only = true ]) : Auth_OpenID_SRegResponse|null

success_response: A SuccessResponse from consumer.complete()

signed_only: Whether to process only data that was signed in the id_res message from the server.

Returns a simple registration response containing the data that was supplied with the C{id_res} response.

Parameters
$success_response : Auth_OpenID_SuccessResponse
$signed_only : bool = true
Return values
Auth_OpenID_SRegResponse|null

get()

public get(mixed $field_name[, mixed $default = null ]) : mixed
Parameters
$field_name : mixed
$default : mixed = null
Return values
mixed

getExtensionArgs()

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

public getExtensionArgs([Auth_OpenID_Request|null $request = null ]) : null
Parameters
$request : Auth_OpenID_Request|null = null
Return values
null

Search results