Moodle  2.2.1
http://www.collinsharper.com
google_authsub Class Reference
Inheritance diagram for google_authsub:
Collaboration diagram for google_authsub:

Public Member Functions

 __construct ($sessiontoken= '', $authtoken= '', $options=array())
 valid_token ()
 revoke_session_token ()

Static Public Member Functions

static login_url ($returnaddr, $realm)
static get_auth_header_name ()

Data Fields

const LOGINAUTH_URL = 'https://www.google.com/accounts/AuthSubRequest'
const VERIFY_TOKEN_URL = 'https://www.google.com/accounts/AuthSubTokenInfo'
const REVOKE_TOKEN_URL = 'https://www.google.com/accounts/AuthSubRevokeToken'

Detailed Description

Definition at line 151 of file googleapi.php.


Constructor & Destructor Documentation

__construct ( sessiontoken = '',
authtoken = '',
options = array() 
)

Constructor, allows subauth requests using the response from an initial AuthSubRequest or with the subauth long-term token. Note that constructing this object without a valid token will cause an exception to be thrown.

Parameters:
string$sessiontokenA long-term subauth session token
string$authtokenA one-time auth token wich is used to upgrade to session token
mixedOptions to pass to the base curl object

Definition at line 165 of file googleapi.php.

Here is the call graph for this function:


Member Function Documentation

static get_auth_header_name ( ) [static]

Reimplemented from google_auth_request.

Definition at line 227 of file googleapi.php.

static login_url ( returnaddr,
realm 
) [static]

Creates a login url for subauth request

Parameters:
string$returnaddrThe address which the user should be redirected to recieve the token
string$realmThe google realm which is access is being requested
Returns:
string URL to bounce the user to

Definition at line 217 of file googleapi.php.

Here is the caller graph for this function:

Calls googles api to revoke the subauth token

Returns:
boolean Returns true if token succesfully revoked

Definition at line 199 of file googleapi.php.

Here is the call graph for this function:

Tests if a subauth token used is valid

Returns:
boolean true if token valid

Definition at line 184 of file googleapi.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

const LOGINAUTH_URL = 'https://www.google.com/accounts/AuthSubRequest'

Definition at line 152 of file googleapi.php.

const REVOKE_TOKEN_URL = 'https://www.google.com/accounts/AuthSubRevokeToken'

Definition at line 154 of file googleapi.php.

const VERIFY_TOKEN_URL = 'https://www.google.com/accounts/AuthSubTokenInfo'

Definition at line 153 of file googleapi.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations