| Methods |
public
|
__construct(Request|array<string, string>|null $request = null)
Creates an OpenID response.
Creates an OpenID response.
An OpenID response is created based on an OpenID request. The
response will contain the same OpenID version, as well as the same
extension URI-to-alias mapping as the underlying request.
Parameters
| $request |
the request to which the response will
be made
|
Overrides
|
#
|
public
|
setVersion(int $version): void
Sets the OpenID version to be used for this response.
Sets the OpenID version to be used for this response.
If $version is OPENID_VERSION_2
, the OpenID 2.0
namespace will be added to the response.
Parameters
| $version |
the OpenID version
|
|
#
|
public
|
set(string $field, string $value, bool|null $signed = null): void
Sets a field in the response
Sets a field in the response
Parameters
| $field |
the field to set
|
| $value |
the value
|
| $signed |
whether this field should be included in the
signature
|
Overrides
|
#
|
public
|
setArray(array<string, string> $data, bool|null $signed = null): void
Sets multiple fields in the response.
Sets multiple fields in the response.
Parameters
| $data |
the fields and values to set
|
| $signed |
whether this field should be included in the
signature
|
|
#
|
public
|
getIndirectComponent(): int
Gets the component to be used in indirect responses.
Gets the component to be used in indirect responses.
Returns
|
#
|
public
|
setIndirectComponent(int $indirect_component): void
Sets the component to be used in indirect responses. This should
be either OPENID_RESPONSE_QUERY or OPENID_RESPONSE_FRAGMENT
Sets the component to be used in indirect responses. This should
be either OPENID_RESPONSE_QUERY or OPENID_RESPONSE_FRAGMENT
Parameters
| $indirect_component |
the component
|
|
#
|
public
|
render(string $indirect_url = null): void
Sends an OpenID assertion response.
Sends an OpenID assertion response.
The OpenID specification version 2.0 provides for the sending of assertions
via indirect communication. However, future versions of the OpenID
specification may provide for sending of assertions via direct communication.
Parameters
| $indirect_url |
the URL to which the OpenID response is sent. If
this is null, the response is sent via direct communication
|
|
#
|
public
|
toDirectMessage(): string
Encodes the response in key-value format
Encodes the response in key-value format
Returns
|
#
|
public
|
toIndirectURL(string $url): string
Encodes the response in application/x-www-form-urlencoded format.
Encodes the response in application/x-www-form-urlencoded format.
Parameters
| $url |
the URL to which the OpenID response is sent.
|
Returns
|
#
|
public
|
getSignatureBaseString(): string
Calculates the base string from which an OpenID signature is generated.
Calculates the base string from which an OpenID signature is generated.
Returns
the signature base string
Implements
|
#
|
public
|
getAliasForExtension(string $ns, bool|string $create = false): string|null
Returns the OpenID alias for an extension, given a Type URI, based on the
alias definitions in the current OpenID request.
Returns the OpenID alias for an extension, given a Type URI, based on the
alias definitions in the current OpenID request.
Parameters
| $ns |
the Type URI
|
| $create |
whether to create an alias if the Type URI does not already
have an alias in the current OpenID request. If this parameter is a string,
then the string specified is the preferred alias to be created, unless a collision
occurs
|
Returns
the alias, or NULL if the Type URI does not already
have an alias in the current OpenID request and $create is false
|
#
|
protected
|
getPrefix(): string
Returns the prefix to be used for extension searching.
Returns the prefix to be used for extension searching.
Returns
Implements
|
#
|
public
static
|
createError(string $error, array<string, string> $additional = [], Request $request = null): Response
Convenient function to create an error response.
Convenient function to create an error response.
Parameters
| $error |
the error message
|
| $additional |
any additional data to be sent with the error
message
|
| $request |
the request
|
|
#
|
public
|
offsetSet($offset, $value): void
|
#
|
public
|
offsetUnset($offset): void
|
#
|