-
cleanAccessTokenRequest() : {undefined}
-
Clean request part of the OAuth object (client credentials, uri endpoint)
Null and remove all data from request part of the OAuth object
Returns:
-
Type
-
undefined
-
cleanAccessTokenResponse() : {undefined}
-
Clean response part of the OAuth object (access_token, e.t.c.)
Null and remove all data from response part of the OAuth object
Returns:
-
Type
-
undefined
-
clientCredentialGrant() : {undefined}
-
Request for access_token(bearer token) using Client Credential Authorization Grant.
Initialize response part of the OAuth object (access_token, e.t.c.)
Returns:
-
Type
-
undefined
-
getAccessTokenRequest() : {Object}
-
Get request part of the OAuth object (client credentials, uri endpoint)
Returns:
cached request
-
Type
-
Object
-
getAccessTokenResponse() : {Object}
-
Get response part of the OAuth object (access_token, e.t.c.)
Returns:
cached response
-
Type
-
Object
-
-
Calculates Authorization header based on client credentials or access_token
Returns:
OAuth 2.0 Authorization header
-
Type
-
Object
-
isInitialized() : {boolean}
-
Check is OAuth initialized (not null access_token).
Returns:
true/false
-
Type
-
boolean
-
setAccessTokenRequest(data) : {undefined}
-
Set request part of the OAuth object (client credentials, uri endpoint)
Parameters:
| Name |
Type |
Description |
data |
Object
|
current client credentials and uri
|
Returns:
-
Type
-
undefined
-
setAccessTokenResponse(data) : {undefined}
-
Set response part of the OAuth object (access_token, e.t.c.)
Parameters:
| Name |
Type |
Description |
data |
Object
|
current response
|
Returns:
-
Type
-
undefined