Documentation

Google_AccessToken_Verify
in package

Wrapper around Google Access Tokens which provides convenience functions

Table of Contents

FEDERATED_SIGNON_CERT_URL  = 'https://www.googleapis.com/oauth2/v3/certs'
OAUTH2_ISSUER  = 'accounts.google.com'
OAUTH2_ISSUER_HTTPS  = 'https://accounts.google.com'
$cache  : CacheItemPoolInterface
$http  : ClientInterface
__construct()  : mixed
Instantiates the class, but does not initiate the login flow, leaving it to the discretion of the caller.
verifyIdToken()  : array<string|int, mixed>
Verifies an id token and returns the authenticated apiLoginTicket.
getBigIntClass()  : mixed
getCache()  : mixed
getFederatedSignOnCerts()  : mixed
getJwtService()  : mixed
getOpenSslConstant()  : mixed
getRsaClass()  : mixed
retrieveCertsFromLocation()  : array<string|int, mixed>
Retrieve and cache a certificates file.
setPhpsecConstants()  : mixed
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

Constants

FEDERATED_SIGNON_CERT_URL

public mixed FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs'

OAUTH2_ISSUER

public mixed OAUTH2_ISSUER = 'accounts.google.com'

OAUTH2_ISSUER_HTTPS

public mixed OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com'

Properties

Methods

verifyIdToken()

Verifies an id token and returns the authenticated apiLoginTicket.

public verifyIdToken(string $idToken[, string $audience = null ]) : array<string|int, mixed>

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 : string

the ID token in JWT format

$audience : string = null

Optional. The audience to verify against JWt "aud"

Return values
array<string|int, mixed>

the token payload, if successful

getBigIntClass()

private getBigIntClass() : mixed
Return values
mixed

getCache()

private getCache() : mixed
Return values
mixed

getFederatedSignOnCerts()

private getFederatedSignOnCerts() : mixed
Return values
mixed

getJwtService()

private getJwtService() : mixed
Return values
mixed

getOpenSslConstant()

private getOpenSslConstant() : mixed
Return values
mixed

getRsaClass()

private getRsaClass() : mixed
Return values
mixed

retrieveCertsFromLocation()

Retrieve and cache a certificates file.

private retrieveCertsFromLocation( $url) : array<string|int, mixed>
Parameters
$url :

string location

Tags
throws
Google_Exception
Return values
array<string|int, mixed>

certificates

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

private setPhpsecConstants() : mixed
Tags
see

phpseclib/Math/BigInteger

see
https://github.com/GoogleCloudPlatform/getting-started-php/issues/85
Return values
mixed

Search results