OAuthToken
Oauth token container
Static Member Summary
Static Public Members | ||
public static get |
Internal storage key name |
Static Method Summary
Static Public Methods | ||
public static |
fromResponseObject(data: String | Object): OAuthToken Build instance from response object |
|
public static |
recover(name: String): OAuthToken | null Recover a token by looking through the HTTPS cookies and localStorage |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
If the token has expired |
|
public |
expires: * |
|
public |
scopes: * |
|
public |
token: * |
|
public |
type: * |
Method Summary
Public Methods | ||
public |
Store the token for later recovery. |
|
public |
Export oauth response query string |
|
public |
toResponseObject(): {access_token: String|*, token_type: String, expires_in: Number, scope: Array<String>|Array|*} Get equivalent OAuth response object |
|
public |
String representation of the token, usable in the Authorization header |
Static Public Members
Static Public Methods
public static fromResponseObject(data: String | Object): OAuthToken source
Build instance from response object
public static recover(name: String): OAuthToken | null source
Recover a token by looking through the HTTPS cookies and localStorage
Params:
Name | Type | Attribute | Description |
name | String | Storage key name |
Throw:
Public Constructors
Public Members
public expires: * source
public scopes: * source
public token: * source
public type: * source
Public Methods
public save(name: String) source
Store the token for later recovery. Token will be stored in HTTPS cookie if possible.
Params:
Name | Type | Attribute | Description |
name | String | db key name |
Throw:
OAuthToken#recover |