Class OAuth
This class wraps all methods for interactions with OAuth service, for user authentication and validation. Also generates the URLs to perform this operations as register or login.
public static
mixed
|
|
public static
|
|
public static
mixed
|
#
doGetAccessToken( string $endpoint_url, string $code, string $redirect_url )
Gets an "access_token" for the current web client. |
public static
boolean
|
|
public static
|
|
public static
mixed
|
#
doExchangeSession( string $endpoint_url, string $cookie_value )
Checks if user is logged by Exchange Session (SSO) |
public static
|
|
public static
|
|
public static
boolean
|
|
public static
boolean|
|
#
getStoredToken( string $name )
Returns a specific stored token. SESSION has more priority than COOKIE. |
public static
mixed
|
#
doGetOpinator( string $endpoint_url, string $scope,
Get The Url for access to the Opinator. |
public static
boolean
|
#
doCheckUserCompleted( string $endpoint_url, string $scope )
Checks if the user has completed all required data for the specified section (scope). |
string |
GRANT_TYPE_AUTH_CODE
Different AUTH method. |
#
'authorization_code'
|
string |
GRANT_TYPE_REFRESH_TOKEN
|
#
'refresh_token'
|
string |
GRANT_TYPE_CLIENT_CREDENTIALS
|
#
'client_credentials'
|
string |
GRANT_TYPE_VALIDATE_BEARER
|
#
'urn:es.cocacola:oauth2:grant_type:validate_bearer'
|
string |
GRANT_TYPE_EXCHANGE_SESSION
|
#
'urn:es.cocacola:oauth2:grant_type:exchange_session'
|
integer |
DEFAULT_EXPIRES_IN
Default expiration time. In seconds. |
#
900
|
float |
SAFETY_RANGE_EXPIRES_IN
Indicates the percentage to be subtracted from the number of seconds of "expires_in" to not be so close to the expiration date of the token. |
#
0.10
|
string |
SSO_COOKIE_NAME
Cookie name for SSO (Single Sign-Out). |
#
'datr'
|