JanRain OpenID Library

Auth_OpenID_AuthRequest
in package

This class represents an authentication request from a consumer to an OpenID server.

Table of Contents

$_anonymous  : bool
$assoc  : Auth_OpenID_Association
$endpoint  : Auth_OpenID_ServiceEndpoint
$message  : Auth_OpenID_Message
$return_to_args  : array<string|int, mixed>
__construct()  : mixed
Initialize an authentication request with the specified token, association, and endpoint.
addExtension()  : mixed
Add an extension to this checkid request.
addExtensionArg()  : Auth_OpenID_FailureResponse|bool|null|string
Add an extension argument to this OpenID authentication request.
formMarkup()  : Auth_OpenID_FailureResponse|Auth_OpenID_Message|string
Get html for a form to submit this request to the IDP.
getMessage()  : Auth_OpenID_Message|Auth_OpenID_FailureResponse
Produce a {@link Auth_OpenID_Message} representing this request.
htmlMarkup()  : Auth_OpenID_FailureResponse|Auth_OpenID_Message|string
Get a complete html document that will autosubmit the request to the IDP.
redirectURL()  : mixed
setAnonymous()  : bool
Set whether this request should be made anonymously. If a request is anonymous, the identifier will not be sent in the request. This is only useful if you are making another kind of request with an extension in this request.
shouldSendRedirect()  : mixed

Properties

$return_to_args

public array<string|int, mixed> $return_to_args

Methods

addExtension()

Add an extension to this checkid request.

public addExtension(Auth_OpenID_Extension $extension_request) : mixed
Parameters
$extension_request : Auth_OpenID_Extension

An object that implements the extension request interface for adding arguments to an OpenID message.

Return values
mixed

addExtensionArg()

Add an extension argument to this OpenID authentication request.

public addExtensionArg(string $namespace, string $key, string $value) : Auth_OpenID_FailureResponse|bool|null|string

Use caution when adding arguments, because they will be URL-escaped and appended to the redirect URL, which can easily get quite long.

Parameters
$namespace : string

The namespace for the extension. For example, the simple registration extension uses the namespace 'sreg'.

$key : string

The key within the extension namespace. For example, the nickname field in the simple registration extension's key is 'nickname'.

$value : string

The value to provide to the server for this argument.

Return values
Auth_OpenID_FailureResponse|bool|null|string

formMarkup()

Get html for a form to submit this request to the IDP.

public formMarkup(string $realm[, null|string $return_to = null ][, bool $immediate = false ][, null|array<string|int, mixed> $form_tag_attrs = null ]) : Auth_OpenID_FailureResponse|Auth_OpenID_Message|string

form_tag_attrs: An array of attributes to be added to the form tag. 'accept-charset' and 'enctype' have defaults that can be overridden. If a value is supplied for 'action' or 'method', it will be replaced.

Parameters
$realm : string
$return_to : null|string = null
$immediate : bool = false
$form_tag_attrs : null|array<string|int, mixed> = null
Return values
Auth_OpenID_FailureResponse|Auth_OpenID_Message|string

getMessage()

Produce a {@link Auth_OpenID_Message} representing this request.

public getMessage(string $realm[, string $return_to = null ][, bool $immediate = false ]) : Auth_OpenID_Message|Auth_OpenID_FailureResponse
Parameters
$realm : string

The URL (or URL pattern) that identifies your web site to the user when she is authorizing it.

$return_to : string = null

The URL that the OpenID provider will send the user back to after attempting to verify her identity.

Not specifying a return_to URL means that the user will not be returned to the site issuing the request upon its completion.

$immediate : bool = false

If true, the OpenID provider is to send back a response immediately, useful for behind-the-scenes authentication attempts. Otherwise the OpenID provider may engage the user before providing a response. This is the default case, as the user may need to provide credentials or approve the request before a positive response can be sent.

Return values
Auth_OpenID_Message|Auth_OpenID_FailureResponse

htmlMarkup()

Get a complete html document that will autosubmit the request to the IDP.

public htmlMarkup(string $realm[, string $return_to = null ][, bool $immediate = false ][, array<string|int, mixed> $form_tag_attrs = null ]) : Auth_OpenID_FailureResponse|Auth_OpenID_Message|string

Wraps formMarkup. See the documentation for that function.

Parameters
$realm : string
$return_to : string = null
$immediate : bool = false
$form_tag_attrs : array<string|int, mixed> = null
Return values
Auth_OpenID_FailureResponse|Auth_OpenID_Message|string

redirectURL()

public redirectURL(mixed $realm[, mixed $return_to = null ][, mixed $immediate = false ]) : mixed
Parameters
$realm : mixed
$return_to : mixed = null
$immediate : mixed = false
Return values
mixed

setAnonymous()

Set whether this request should be made anonymously. If a request is anonymous, the identifier will not be sent in the request. This is only useful if you are making another kind of request with an extension in this request.

public setAnonymous(bool $is_anonymous) : bool

Anonymous requests are not allowed when the request is made with OpenID 1.

Parameters
$is_anonymous : bool
Return values
bool

shouldSendRedirect()

public shouldSendRedirect() : mixed
Return values
mixed

Search results