\Google_AccessToken_Verify

Wrapper around Google Access Tokens which provides convenience functions

Summary

Methods
Properties
Constants
__construct()
verifyIdToken()
No public properties found
FEDERATED_SIGNON_CERT_URL
OAUTH2_ISSUER
OAUTH2_ISSUER_HTTPS
No protected methods found
No protected properties found
N/A
getCache()
retrieveCertsFromLocation()
getFederatedSignOnCerts()
getJwtService()
getRsaClass()
getBigIntClass()
getOpenSslConstant()
setPhpsecConstants()
$http
$cache
N/A

Constants

FEDERATED_SIGNON_CERT_URL

FEDERATED_SIGNON_CERT_URL

OAUTH2_ISSUER

OAUTH2_ISSUER

OAUTH2_ISSUER_HTTPS

OAUTH2_ISSUER_HTTPS

Properties

$http

$http : \GuzzleHttp\ClientInterface

Type

\GuzzleHttp\ClientInterface — The http client

$cache

$cache : \Psr\Cache\CacheItemPoolInterface

Type

\Psr\Cache\CacheItemPoolInterface — cache class

Methods

__construct()

__construct(\GuzzleHttp\ClientInterface  $http = null, \Psr\Cache\CacheItemPoolInterface  $cache = null,   $jwt = null) 

Instantiates the class, but does not initiate the login flow, leaving it to the discretion of the caller.

Parameters

\GuzzleHttp\ClientInterface $http
\Psr\Cache\CacheItemPoolInterface $cache
$jwt

verifyIdToken()

verifyIdToken(  $idToken,   $audience = null) : array

Verifies an id token and returns the authenticated apiLoginTicket.

Throws an exception if the id token is not valid. The audience parameter can be used to control which id tokens are accepted. By default, the id token must have been issued to this OAuth2 client.

Parameters

$idToken
$audience

Returns

array —

the token payload, if successful

getCache()

getCache() 

retrieveCertsFromLocation()

retrieveCertsFromLocation(  $url) : array

Retrieve and cache a certificates file.

Parameters

$url

string location

Throws

\Google_Exception

Returns

array —

certificates

getFederatedSignOnCerts()

getFederatedSignOnCerts() 

getJwtService()

getJwtService() 

getRsaClass()

getRsaClass() 

getBigIntClass()

getBigIntClass() 

getOpenSslConstant()

getOpenSslConstant() 

setPhpsecConstants()

setPhpsecConstants() 

phpseclib calls "phpinfo" by default, which requires special whitelisting in the AppEngine VM environment. This function sets constants to bypass the need for phpseclib to check phpinfo