Class handles process of creation a Google Client, authenticates user and handles access token operations.
More...
Class handles process of creation a Google Client, authenticates user and handles access token operations.
◆ __construct()
| __construct |
( |
Session |
$session | ) |
|
◆ getAccessToken()
Get currently stored access token.
- Returns
- string
◆ getClient()
Get Google Client Object.
- Returns
◆ getGoogleLink()
Get Google Authentication link that user will be redirected to once he click Login button.
- Returns
- string
◆ handleGoogleResponse()
| handleGoogleResponse |
( |
|
$authCode | ) |
|
Receive Google Access Token based on authentication code.
- Parameters
-
◆ isAuthenticated()
Determine whether app still has a valid access token.
- Returns
- bool
◆ setupClient()
Method prepares Google Client and sets the callback URL.
◆ $client
◆ $scopes
Initial value:= [
"http://www.google.com/m8/feeds/contacts/",
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/admin.directory.user.readonly"
]
◆ $sessionSection
◆ CLIENT_SECRET_PATH
| const CLIENT_SECRET_PATH = __DIR__."/../config/google-client-secret.json" |
◆ ERROR_NO_DOMAIN
| const ERROR_NO_DOMAIN = 1 |
◆ ERROR_NOT_ADMIN
| const ERROR_NOT_ADMIN = 2 |
◆ SESSION_SECTION
| const SESSION_SECTION = "oauth2-google" |
The documentation for this class was generated from the following file: