class Google_AccessToken_Verify (View source)

Wrapper around Google Access Tokens which provides convenience functions

Constants

FEDERATED_SIGNON_CERT_URL

OAUTH2_ISSUER

OAUTH2_ISSUER_HTTPS

Methods

__construct(ClientInterface $http = null, CacheItemPoolInterface $cache = null)

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

array
verifyIdToken($idToken, $audience = null)

Verifies an id token and returns the authenticated apiLoginTicket.

Details

__construct(ClientInterface $http = null, CacheItemPoolInterface $cache = null)

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

Parameters

ClientInterface $http
CacheItemPoolInterface $cache

array verifyIdToken($idToken, $audience = null)

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

Return Value

array

the token payload, if successful