class Verify (View source)

Wrapper around Google Access Tokens which provides convenience functions

Constants

FEDERATED_SIGNON_CERT_URL

OAUTH2_ISSUER

OAUTH2_ISSUER_HTTPS

Properties

JWT $jwt

Methods

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

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

array|false
verifyIdToken(string $idToken, string $audience = null)

Verifies an id token and returns the authenticated apiLoginTicket.

Details

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

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

Parameters

ClientInterface $http
CacheItemPoolInterface $cache
$jwt

array|false verifyIdToken(string $idToken, string $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

string $idToken the ID token in JWT format
string $audience Optional. The audience to verify against JWt "aud"

Return Value

array|false the token payload, if successful