phpDocumentor

GoogleSingleSignonService extends AbstractSingleSignonService
in package

Table of Contents

DISCOVERY_URL  = 'https://accounts.google.com/.well-known/openid-configuration'
PASSWORD_ENTROPY_SIZE  = 1024
$clientId  : mixed
$clientSecret  : mixed
$discoveryService  : mixed
$logger  : LoggerInterface
$loggerSubsystem  : mixed
$redirectUri  : mixed
__construct()  : mixed
getAuthorizationLink()  : mixed
processAuthorizationCode()  : mixed
setLogger()  : void
determineCountryByLocale()  : mixed
extractIdToken()  : array<string|int, mixed>|mixed
Extracts claims data from encoded JWT data.
generateRandomBytes()  : mixed
getLogger()  : LoggerInterface
makePassword()  : mixed
retrieveTokensByCode()  : array<string|int, mixed>|mixed
Uses an authorization code to retrieve access_token and id_token.

Constants

Properties

Methods

__construct()

public __construct(mixed $clientId, mixed $clientSecret, mixed $redirectUri) : mixed
Parameters
$clientId : mixed
$clientSecret : mixed
$redirectUri : mixed
Return values
mixed

processAuthorizationCode()

public processAuthorizationCode(mixed $code) : mixed
Parameters
$code : mixed
Return values
mixed

determineCountryByLocale()

protected determineCountryByLocale([mixed $locale = '' ]) : mixed
Parameters
$locale : mixed = ''
Return values
mixed

extractIdToken()

Extracts claims data from encoded JWT data.

protected extractIdToken( $idToken) : array<string|int, mixed>|mixed

Returns an array: Array ( [azp] => 123412341234123412341234123412341234123411234.apps.googleusercontent.com [aud] => 123412341234123412341234123412341234123412344.apps.googleusercontent.com [sub] => 111112222233334445555 [email] => john.doe@example.com [email_verified] => 1 [at_hash] => dunegldnuditJDTRENia [iss] => https://accounts.google.com [iat] => 1500553894 [exp] => 1500557494 [name] => John Doe [picture] => https://lh3.googleusercontent.com/somewhere/photo.jpg [given_name] => John [family_name] => Doe [locale] => de )

Parameters
$idToken :
Return values
array<string|int, mixed>|mixed

generateRandomBytes()

protected generateRandomBytes([mixed $numBytes = 1024 ]) : mixed
Parameters
$numBytes : mixed = 1024
Return values
mixed

retrieveTokensByCode()

Uses an authorization code to retrieve access_token and id_token.

protected retrieveTokensByCode( $code) : array<string|int, mixed>|mixed

The array returned should contain keys access_token, token_type, expires_in and id_token. access_token and id_token are in JSON Web Token format; use extractIdToken() to extract claims data from id_token. The token_type is always “Bearer”, and expires_in is given in seconds.

Parameters
$code :
Tags
throws
Exception
Return values
array<string|int, mixed>|mixed

Search results