\Simplify_AccessToken

AccessToken - used to manage OAuth access tokens

Summary

Methods
Properties
Constants
__construct()
create()
refresh()
revoke()
setAll()
getProperties()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
sendRequest()
$properties
N/A

Properties

$properties

$properties

Methods

__construct()

__construct( $hash)

Parameters

$hash

create()

create(mixed $code, mixed $redirect_uri, mixed $authentication) : \Simplify_AccessToken

Creates an OAuth access token

Parameters

mixed $code
  • the authorisation code returned from the GET on /oauth/authorize
mixed $redirect_uri

= this must be the redirect_uri set in the apps configuration

mixed $authentication
  • Authentication information to access the API. If not value is passed the global key Simplify::$publicKey and Simplify::$privateKey are used

Returns

\Simplify_AccessToken

refresh()

refresh(mixed $authentication) : \Simplify_AccessToken

Refreshes the current token. The access_token and refresh_token values will be updated.

Parameters

mixed $authentication
  • Authentication information to access the API. If not value is passed the global key Simplify::$publicKey and Simplify::$privateKey are used

Throws

\InvalidArgumentException

Returns

\Simplify_AccessToken

revoke()

revoke(mixed $authentication) : \Simplify_AccessToken

<p>Revokes a token from further use.

Parameters

mixed $authentication
  • Authentication information to access the API. If not value is passed the global key Simplify::$publicKey and Simplify::$privateKey are used

Throws

\InvalidArgumentException

Returns

\Simplify_AccessToken

setAll()

setAll(mixed $hash)

Updates the object's properties with the values in the specified map.

Parameters

mixed $hash

array Map of values to set.

getProperties()

getProperties() : array

Returns the object's properties as a map.

Returns

array —

map of properties.

sendRequest()

sendRequest( $props,  $context,  $authentication)

Parameters

$props
$context
$authentication