澳门大阳城

Public Member Functions | Protected Member Functions | Private Attributes

MongoOAuth2 Class Reference

Inheritance diagram for MongoOAuth2:

List of all members.

Public Member Functions

 __construct ()
 addClient ($client_id, $client_secret, $redirect_uri)

Protected Member Functions

 checkClientCredentials ($client_id, $client_secret=NULL)
 getRedirectUri ($client_id)
 getAccessToken ($oauth_token)
 setAccessToken ($oauth_token, $client_id, $expires, $scope=NULL)
 getSupportedGrantTypes ()
 getAuthCode ($code)
 setAuthCode ($code, $client_id, $redirect_uri, $expires, $scope=NULL)

Private Attributes

 $db

Detailed Description

Sample OAuth2 Library Mongo DB Implementation.

Definition at line 12 of file MongoOAuth2.inc.


Constructor & Destructor Documentation

__construct (  ) 

Overrides OAuth2::__construct().

Definition at line 19 of file MongoOAuth2.inc.


Member Function Documentation

addClient ( client_id,
client_secret,
redirect_uri 
)

Little helper function to add a new client to the database.

Do NOT use this in production! This sample code stores the secret in plaintext!

Parameters:
$client_id Client identifier to be stored.
$client_secret Client secret to be stored.
$redirect_uri Redirect URI to be stored.

Definition at line 39 of file MongoOAuth2.inc.

checkClientCredentials ( client_id,
client_secret = NULL 
) [protected]

Implements OAuth2::checkClientCredentials().

Do NOT use this in production! This sample code stores the secret in plaintext!

Reimplemented from OAuth2.

Definition at line 53 of file MongoOAuth2.inc.

getAccessToken ( oauth_token  )  [protected]

Implements OAuth2::getAccessToken().

Reimplemented from OAuth2.

Definition at line 69 of file MongoOAuth2.inc.

getAuthCode ( code  )  [protected]

Overrides OAuth2::getAuthCode().

Reimplemented from OAuth2.

Definition at line 97 of file MongoOAuth2.inc.

getRedirectUri ( client_id  )  [protected]

Implements OAuth2::getRedirectUri().

Reimplemented from OAuth2.

Definition at line 61 of file MongoOAuth2.inc.

getSupportedGrantTypes (  )  [protected]

Overrides OAuth2::getSupportedGrantTypes().

Reimplemented from OAuth2.

Definition at line 88 of file MongoOAuth2.inc.

setAccessToken ( oauth_token,
client_id,
expires,
scope = NULL 
) [protected]

Implements OAuth2::setAccessToken().

Reimplemented from OAuth2.

Definition at line 76 of file MongoOAuth2.inc.

setAuthCode ( code,
client_id,
redirect_uri,
expires,
scope = NULL 
) [protected]

Overrides OAuth2::setAuthCode().

Reimplemented from OAuth2.

Definition at line 105 of file MongoOAuth2.inc.


Member Data Documentation

$db [private]

Definition at line 14 of file MongoOAuth2.inc.


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 2011 17:54:04 for oauth2-php by  doxygen 1.7.1
【网站地图】