Property | Type | Description | |
---|---|---|---|
$URL_MAP | array | Auth0 URL Map. | |
$persistantMap | array | Available keys to persist data. |
Property | Type | Description | |
---|---|---|---|
$access_token | string | NULL means that there is no authorization yet. | |
$client_id | string | Auth0 Client ID | |
$client_secret | string | Auth0 Client Secret | |
$debug_mode | boolean | Debug mode flag. | |
$debugger | Closure | Will be called only if $debug_mode is true. | |
$domain | string | Auth0 Domain. | |
$oauth_client | OAuth2 Client. | ||
$redirect_uri | string | Redirect URI needed on OAuth2 requests. | |
$refresh_token | string | Auth0 Refresh Token | |
$user | string | The user object |
Method | Description | |
---|---|---|
__construct ( array $config ) | BaseAuth0 Constructor. | |
checkRequirements ( ) | Checks for all dependencies of SDK or API. | |
debugInfo ( mixed $info ) | If debug mode is set, sends $info to debugger \Closure. | |
deleteAllPersistentData ( ) | Deletes all persistent data, for every mapped key. | |
exchangeCode ( ) : boolean | Exchanges the code from the URI parameters for an access token, id token and user info | |
getAccessToken ( ) : string | Gets $access_token. | |
getAppMetadata ( ) | ||
getClientId ( ) : string | Gets $client_id. | |
getClientSecret ( ) : string | Gets $client_secret. | |
getDebugMode ( ) : boolean | Gets $debug_mode. | |
getDebugger ( ) : Closure | Gets $debugger. | |
getDomain ( ) : string | Gets $domain | |
getIdToken ( ) : string | Gets the id token | |
getRedirectUri ( ) : string | Gets $redirect_uri. | |
getRefreshToken ( ) : string | Gets $refresh_token. | |
getUser ( ) : array | Requests user info to Auth0 server. | |
getUserMetadata ( ) | ||
logout ( ) | Logout (removes all persisten data) | |
setAccessToken ( string $access_token ) : Auth0\SDK\BaseAuth0 | Sets and persists $access_token. | |
setClientId ( string $client_id ) : Auth0\SDK\BaseAuth0 | Sets $client_id. | |
setClientSecret ( string $client_secret ) : Auth0\SDK\BaseAuth0 | Sets $client_secret. | |
setDebugMode ( boolean $debug_mode ) : Auth0\SDK\BaseAuth0 | Sets $debug_mode. | |
setDebugger ( Closure $debugger ) : Auth0\SDK\BaseAuth0 | Sets $debugger. | |
setDomain ( string $domain ) : Auth0\SDK\BaseAuth0 | Sets $domain. | |
setIdToken ( string $id_token ) : Auth0\SDK\BaseAuth0 | Sets and persists $id_token. | |
setRedirectUri ( string $redirect_uri ) : Auth0\SDK\BaseAuth0 | Sets $redirect_uri. | |
setRefreshToken ( string $refresh_token ) : Auth0\SDK\BaseAuth0 | Sets and persists $refresh_token. | |
setUser ( $user ) | ||
updateUserMetadata ( $metadata ) : User | Updathes the user metadata. This end up calling the path /users/{id_user} To delete an attribute, just set it null. ie: [ 'old_attr' => null ] It will only update the existing attrs and keep the others untouch for more info: https://auth0.com/docs/apiv2#!/users/patch_users_by_id |
Method | Description | |
---|---|---|
generateUrl ( string $domain_key, string $path = '/' ) : string | Constructs an API URL. |
Method | Description | |
---|---|---|
dontPersist ( String $name ) | Removes $name from the persistantMap, thus not persisting it when we set the value |
public __construct ( array $config ) | ||
$config | array | Required |
final public checkRequirements ( ) |
public deleteAllPersistentData ( ) |
public exchangeCode ( ) : boolean | ||
return | boolean | Whether it exchanged the code or not correctly |
final public getAccessToken ( ) : string | ||
return | string |
final public getClientId ( ) : string | ||
return | string |
final public getClientSecret ( ) : string | ||
return | string |
final public getDebugMode ( ) : boolean | ||
return | boolean |
final public getDebugger ( ) : Closure | ||
return | Closure |
final public getIdToken ( ) : string | ||
return | string |
final public getRedirectUri ( ) : string | ||
return | string |
final public getRefreshToken ( ) : string | ||
return | string |
public setAccessToken ( string $access_token ) : Auth0\SDK\BaseAuth0 | ||
$access_token | string | |
return | Auth0\SDK\BaseAuth0 |
final public setClientId ( string $client_id ) : Auth0\SDK\BaseAuth0 | ||
$client_id | string | |
return | Auth0\SDK\BaseAuth0 |
final public setClientSecret ( string $client_secret ) : Auth0\SDK\BaseAuth0 | ||
$client_secret | string | |
return | Auth0\SDK\BaseAuth0 |
final public setDebugMode ( boolean $debug_mode ) : Auth0\SDK\BaseAuth0 | ||
$debug_mode | boolean | |
return | Auth0\SDK\BaseAuth0 |
final public setDebugger ( Closure $debugger ) : Auth0\SDK\BaseAuth0 | ||
$debugger | Closure | |
return | Auth0\SDK\BaseAuth0 |
public setIdToken ( string $id_token ) : Auth0\SDK\BaseAuth0 | ||
$id_token | string | |
return | Auth0\SDK\BaseAuth0 |
final public setRedirectUri ( string $redirect_uri ) : Auth0\SDK\BaseAuth0 | ||
$redirect_uri | string | |
return | Auth0\SDK\BaseAuth0 |
public setRefreshToken ( string $refresh_token ) : Auth0\SDK\BaseAuth0 | ||
$refresh_token | string | |
return | Auth0\SDK\BaseAuth0 |
public updateUserMetadata ( $metadata ) : User | ||
return | User | data |
protected string $access_token | ||
return | string |
protected string $client_secret | ||
return | string |
protected Closure $debugger | ||
return | Closure |
protected Client,OAuth2 $oauth_client | ||
return |
public array $persistantMap | ||
return | array |
protected string $redirect_uri | ||
return | string |
protected string $refresh_token | ||
return | string |