Class: OAuth2

OAuth2


new OAuth2( [json])

OAuth 2 token responses
Parameters:
Name Type Argument Description
json Object <optional>

Extends

Methods


getAccessToken()

Get the access token
Returns:
access_token
Type
String

getError()

Get the error
Returns:
error
Type
String

getErrorDescription()

Get the error description
Returns:
error_description
Type
String

getTokenType()

Get the token type
Returns:
token_type
Type
String

init(json)

Initialize from JSON
Parameters:
Name Type Description
json Object
Overrides:
Returns:
OAuth2 this

<static> isInstance(obj)

Check whether the given object is an instance of this class.
Parameters:
Name Type Description
obj Object
Returns:
Type
Boolean

setAccessToken(access_token)

Set the access token
Parameters:
Name Type Description
access_token String
Returns:
this
Type
OAuth2

setError(error)

Set the error
Parameters:
Name Type Description
error String
Returns:
this
Type
OAuth2

setErrorDescription(error_description)

Set the error description
Parameters:
Name Type Description
error_description String
Returns:
this
Type
OAuth2

setTokenType(token_type)

Set the token type
Parameters:
Name Type Description
token_type String
Returns:
this
Type
OAuth2

toJSON()

Export the object as JSON
Overrides:
Returns:
JSON object
Type
Object