abstract class (none) \ LightOpenIDProvider

All known direct subclasses:
BasicProvider,MysqlProvider


Method Summary

Name Description
__call($name, $args)
__construct()
assoc_handle() Generates a new association handle.
associate() Performs association with an RP.
ax()
b64dec($str) Converts base64 encoded number to it's decimal representation.
cancel() Responds with an information that the user has canceled authentication.
checkRealm()
checkid($realm, $attributes) Checks whether an user is authenticated. The function should determine what fields it wants to send to the RP, and put them in the $attributes array.
decb64($num) Complements b64dec.
delAssoc($handle) Deletes an association. If you want to use php sessions in your provider code, you have to replace it.
dh() Encrypts the MAC key using DH key exchange.
errorResponse() Outputs a direct error.
generateAssociation() Creates a private association.
getAssoc($handle) Retreives association data. If you want to use php sessions in your provider code, you have to replace it.
keyValueForm($params) Encodes fields in key-value form.
keygen($length) Generates a private key.
positiveResponse($identity, $attributes) Sends an positive assertion.
redirect($location) Redirects the user to an url.
response($params) Prepares an indirect response url.
responseAttributes($attributes) Prepares an array of attributes to send
server() Does everything that a provider has to -- in one function.
setAssoc($handle, $assoc) Stores an association. If you want to use php sessions in your provider code, you have to replace it.
setup($identity, $realm, $assoc_handle, $attributes) Displays an user interface for inputting user's login and password. Attributes are always AX field namespaces, with stripped host part. For example, the $attributes array may be: array( 'required' => array('namePerson/friendly', 'contact/email'), 'optional' => array('pref/timezone', 'pref/language')
shared_secret($hash) Generates a random shared secret.
sreg()
verify() Aids an RP in assertion verification.
x_or($a, $b) XORs two strings.
xrds($force = null) Displays an XRDS document, or redirects to it. By default, it detects whether it should display or redirect automatically.
xrdsContent() Returns the content of the XRDS document

public function __call($name, $args)


public function __construct()


protected function assoc_handle()

Generates a new association handle.

Returns:
string

protected function associate()

Performs association with an RP.


protected function ax()


protected function b64dec($str)

Converts base64 encoded number to it's decimal representation.

Parameters:
String - $str base64 encoded number.
Returns:
String Decimal representation of that number.

protected function cancel()

Responds with an information that the user has canceled authentication.


protected function checkRealm()


abstract function checkid($realm, $attributes)

Checks whether an user is authenticated. The function should determine what fields it wants to send to the RP, and put them in the $attributes array.

Parameters:
Array - $attributes
String - $realm Realm used for authentication.
Returns:
String OP-local identifier of an authenticated user, or an empty value.

protected function decb64($num)

Complements b64dec.


protected function delAssoc($handle)

Deletes an association. If you want to use php sessions in your provider code, you have to replace it.

Parameters:
String - $handle Association handle.

protected function dh()

Encrypts the MAC key using DH key exchange.


protected function errorResponse()

Outputs a direct error.


protected function generateAssociation()

Creates a private association.


protected function getAssoc($handle)

Retreives association data. If you want to use php sessions in your provider code, you have to replace it.

Parameters:
String - $handle Association handle.
Returns:
Array Association data.

protected function keyValueForm($params)

Encodes fields in key-value form.

Parameters:
Array - $params Fields to be encoded.
Returns:
String $params in key-value form.

protected function keygen($length)

Generates a private key.

Parameters:
int - $length Length of the key.

protected function positiveResponse($identity, $attributes)

Sends an positive assertion.

Parameters:
String - $identity the OP-Local Identifier that is being authenticated.
Array - $attributes User attributes to be sent.

protected function redirect($location)

Redirects the user to an url.

Parameters:
String - $location The url that the user will be redirected to.

protected function response($params)

Prepares an indirect response url.

Parameters:
array - $params Parameters to be sent.

protected function responseAttributes($attributes)

Prepares an array of attributes to send


public function server()

Does everything that a provider has to -- in one function.


protected function setAssoc($handle, $assoc)

Stores an association. If you want to use php sessions in your provider code, you have to replace it.

Parameters:
String - $handle Association handle -- should be used as a key.
Array - $assoc Association data.

abstract function setup($identity, $realm, $assoc_handle, $attributes)

Displays an user interface for inputting user's login and password. Attributes are always AX field namespaces, with stripped host part. For example, the $attributes array may be: array( 'required' => array('namePerson/friendly', 'contact/email'), 'optional' => array('pref/timezone', 'pref/language')

Parameters:
String - Association handle. must be sent as openid.assoc_handle in $_GET or $_POST in subsequent requests.
Array - User attributes requested by the RP.

protected function shared_secret($hash)

Generates a random shared secret.

Returns:
string

protected function sreg()


protected function verify()

Aids an RP in assertion verification.

Returns:
bool Information whether the verification suceeded.

protected function x_or($a, $b)

XORs two strings.

Parameters:
String - $b
Returns:
String $a ^ $b

public function xrds($force = null)

Displays an XRDS document, or redirects to it. By default, it detects whether it should display or redirect automatically.

Parameters:
bool|null - $force When true, always display the document, when false always redirect.
Defaults:
force = null

protected function xrdsContent()

Returns the content of the XRDS document

Returns:
String The XRDS document.