\Hazaar\Auth\Adapter
OAuth2
OAuth short summary.

OAuth description.

Tags

Version

1.0

Author

jamiec

Summary
Methods Properties Constants
has
set
No constants
Properties
$client_id
$client_id
$client_secret
$client_secret
$grant_type
$grant_type
$http_client
$http_client
$scopes
$scopes
$target_url
$target_url
Inherited
$namespace
$namespace
Inherited
$session
$session
Methods
__construct()
__construct($target_url, $client_id, $client_secret, $grant_type = 'code', $cache_config = Array ( ) , $cache_backend = 'session')

Parameters

$target_url

No description

$client_id

No description

$client_secret

No description

$grant_type

No description

$cache_config

No description

$cache_backend

No description

addScope()
addScope($scope)

Parameters

$scope

No description

authenticate()
authenticate($identity = null, $credential = null, $autologin = false) : boolean
Authenticate the user credentials using the OAuth2 "password" grant type.

Parameters

$identitymixed

The user identity (username).

$credentialmixed

The user credential (password).

$autologinmixed

The autologin flag. If checked the session will be remembered and the refresh token used to obtain a new access token when it expires.

Returns

boolean

True if the authentication was successful. False otherwise.

authenticateCode()
authenticateCode()
authenticateCredentials()
authenticateCredentials($identity, $credential, $grant_type = 'password')

Parameters

$identity

No description

$credential

No description

$grant_type

No description

authenticated()
authenticated() : mixed
Check if there is a current user authentication in the session namespace.

Returns true if we have an access token. False otherwise.

Returns

mixed
getAccessToken()
getAccessToken()
getRedirectUri()
getRedirectUri()
getRefreshToken()
getRefreshToken()
queryAuth()
queryAuth($identity, $extra = Array ( ) )

Parameters

$identity

No description

$extra

No description

refresh()
refresh($token = null, $identity = null, $credential = null)

Parameters

$token

No description

$identity

No description

$credential

No description

Inherited
getCredential()
getCredential($credential = null)

Parameters

$credential

No description

Inherited
getIdentity()
getIdentity()
Inherited
getUserData()
getUserData()
Inherited
has()
has($key)

Parameters

$key

No description

Inherited
offsetExists()
offsetExists($key)
Array Access Methods

These methods allows accessing user data as array attributes of the auth object. These methods do not allow this data to be modified in any way.

Parameters

$key

No description

Inherited
offsetGet()
offsetGet($key)

Parameters

$key

No description

Inherited
offsetSet()
offsetSet($key, $value)

Parameters

$key

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($key)

Parameters

$key

No description

Inherited
set()
set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
setCredential()
setCredential($credential)

Parameters

$credential

No description

InheritedStatic
setCredentialEncryption()
setCredentialEncryption($method, $count = 1)

Parameters

$method

No description

$count

No description

Inherited
setDataFields()
setDataFields($fields)

Parameters

$fieldsarray

No description

Inherited
setIdentity()
setIdentity($identity)

Parameters

$identity

No description