Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
OpenID provider (server) implementation
string $_loginUrl = ''
URL to peform interactive user login
string $_opEndpoint = ''
The OP Endpoint URL
integer $_sessionTtl = ''
Time to live of association session in secconds
Zend_OpenId_Provider_Storage $_storage = ''
Reference to an implementation of storage object
string $_trustUrl = ''
URL to peform interactive validation of consumer by user
Zend_OpenId_Provider_User $_user = ''
Reference to an implementation of user object
__construct(
string $loginUrl
=
null, string $trustUrl
=
null, Zend_OpenId_Provider_User $user
=
null, Zend_OpenId_Provider_Storage $storage
=
null, integer $sessionTtl
=
3600
)
:
Constructs a Zend_OpenId_Provider object with given parameters.
_associate(
float $version, array $params
)
:
array
Processes association request from OpenID consumerm generates secret shared key and send it back using Diffie-Hellman encruption.
Returns array of variables to push back to consumer.
_checkAuthentication(
float $version, array $params
)
:
array
Performs authentication validation for dumb consumers Returns array of variables to push back to consumer.
It MUST contain 'is_valid' variable with value 'true' or 'false'.
_checkId(
float $version, array $params, bool $immediate, mixed $extensions
=
null, Zend_Controller_Response_Abstract $response
=
null
)
:
array
Performs authentication (or authentication check).
_genSecret(
string $func
)
:
mixed
Generates a secret key for given hash function, returns RAW key or false if function is not supported
_respond(
float $version, array $ret, array $params, mixed $extensions
=
null
)
:
array
Perepares information to send back to consumer's authentication request and signs it using shared secret.
allowSite(
string $root, mixed $extensions
=
null
)
:
bool
Allows consumer with given root URL to authenticate current logged in user. Returns true on success and false on error.
delSite(
string $root
)
:
bool
Delete consumer with given root URL from known sites of current logged in user. Next time this consumer will try to authenticate the user, Provider will ask user's confirmation.
Returns true on success and false on error.
denySite(
string $root
)
:
bool
Prohibit consumer with given root URL to authenticate current logged in user. Returns true on success and false on error.
getLoggedInUser(
)
:
mixed
Returns identity URL of current logged in user or false
getSiteRoot(
array $params
)
:
mixed
Retrieve consumer's root URL from request query.
Returns URL or false in case of failure
getTrustedSites(
)
:
mixed
Returns list of known consumers for current logged in user or false if he is not logged in.
handle(
array $params
=
null, mixed $extensions
=
null, Zend_Controller_Response_Abstract $response
=
null
)
:
mixed
Handles HTTP request from consumer
hasUser(
string $id
)
:
bool
Returns true if user with given $id exists and false otherwise
login(
string $id, string $password
)
:
bool
Performs login of user with given $id and $password Returns true in case of success and false otherwise
logout(
)
:
void
Performs logout. Clears information about logged in user.
register(
string $id, string $password
)
:
bool
Registers a new user with given $id and $password Returns true in case of success and false if user with given $id already exists
respondToConsumer(
array $params, mixed $extensions
=
null, Zend_Controller_Response_Abstract $response
=
null
)
:
bool
Perepares information to send back to consumer's authentication request, signs it using shared secret and send back through HTTP redirection
setOpEndpoint(
string $url
)
:
null
Sets the OP Endpoint URL