Authenticator that validates whether user is GSuite administrator so he can use this app.
More...
Authenticator that validates whether user is GSuite administrator so he can use this app.
◆ __construct()
◆ authenticate()
| authenticate |
( |
array |
$credentials | ) |
|
Method will validate that user is properly authenticated with google and he is a GSuite Administrator.
- Parameters
-
| array | $credentials | Array that carry Google Oauth code |
- Returns
- UserIdentity User Identity is returned if user is properly authenticated Admin
- Exceptions
-
| AuthenticationException | Exception is thrown when user is not properly authenticated or he is not an Admin |
◆ getUserFromGoogle()
Ask Google for more details about authenticated user.
- Returns
- User
- Exceptions
-
| AuthenticationException | Exception is thrown whenever Google does not provide information about user |
◆ validateAdmin()
| validateAdmin |
( |
User |
$user | ) |
|
|
private |
Check whether authenticated user is an GSuite Administrator.
- Parameters
-
- Returns
- bool True when user is GSuite Admin
- Exceptions
-
| AuthenticationException | Thrown when user is not member of domain or he is not an Admin. |
◆ $oauth
◆ NO_DOMAIN_FOUND
| const NO_DOMAIN_FOUND = 404 |
The documentation for this class was generated from the following file: