GoogleLogin
class GoogleLogin
A very simple Google Login
This is a simple wrapper class to hold some Google Login functionalty. I wrapped this in a class to avoid namespace conflicts with the common function names in this code.
It is based on this blog post:
http://www.nmecs.com/articles/google-single-sign-on-without-sdk
See docs/LOGIN.md in the tsugi repo for details on how to set this up with Tsugi.
Properties
$client_id | |||
$client_secret | |||
$openid_realm | |||
$redirect | |||
$access_token | |||
$last_response | |||
$authentication_object |
Methods
No description
Get the login url
Get the access token
No description
Utility code in order not to have external dependencies and to have some logging.
Utility code in order not to have external dependencies and to have some logging.
Details
at line 29
__construct($client_id, $client_secret, $redirect, $openid_realm = false)
at line 39
getLoginUrl($state)
Get the login url
at line 57
getAccessToken($google_code)
Get the access token
at line 102
getUserInfo($access_token = FALSE)
at line 145
curl_post($url, $post)
Utility code in order not to have external dependencies and to have some logging.
at line 163
curl_get($url)
Utility code in order not to have external dependencies and to have some logging.