Wrapper around Google Access Tokens which provides convenience functions.
- experimental
| Constants |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| Methods |
public __construct(?callable $httpHandler = NULL, ?Psr\Cache\CacheItemPoolInterface $cache = NULL)
|
| public revoke( $token, array $options = []) Revoke an OAuth2 access token or refresh token. This method will revoke the current access token, if a token isn't provided.
|
| public verify( $token, array $options = []) 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.
|
| Methods |
| protected callJwtStatic( $method, array $args = []) Provide a hook to mock calls to the JWT static methods.
|
| protected callSimpleJwtDecode(array $args = []) Provide a hook to mock calls to the JWT static methods.
|
| Properties |
private $cache = NULL
|
private $httpHandler = NULL
|
| Methods |
private checkAndInitializePhpsec()
|
private checkSimpleJwt()
|
| private determineAlg(array $certs) Identifies the expected algorithm to verify by looking at the "alg" key of the provided certs.
|
| private getCacheKeyFromCertLocation( $certsLocation) Generate a cache key based on the cert location using sha1 with the exception of using "federated_signon_certs_v3" to preserve BC.
|
| private getCerts( $location, $cacheKey, array $options = []) Gets federated sign-on certificates to use for verifying identity tokens. Returns certs as array structure, where keys are key ids, and values are PEM encoded certificates.
|
private loadPhpsecPublicKey(string $modulus, string $exponent) : string
|
| private retrieveCertsFromLocation( $url, array $options = []) Retrieve and cache a certificates file.
|
| private verifyEs256( $token, array $certs, $audience = NULL, $issuer = NULL) Verifies an ES256-signed JWT.
|
| private verifyRs256( $token, array $certs, $audience = NULL, $issuer = NULL) Verifies an RS256-signed JWT.
|