TokenCredentials class
A credentials object that uses a token string and a authorzation scheme to authenticate.
Constructors
Token |
Creates a new TokenCredentials object. |
Properties
authorization |
|
token |
Methods
sign |
Signs a request with the Authentication header. |
Constructor Details
TokenCredentials(string, string)
Creates a new TokenCredentials object.
new TokenCredentials(token: string, authorizationScheme?: string)
Parameters
- token
-
string
The token.
- authorizationScheme
-
string
The authorization scheme.
Property Details
authorizationScheme
authorizationScheme: string
Property Value
string
token
token: string
Property Value
string
Method Details
signRequest(WebResourceLike)
Signs a request with the Authentication header.
function signRequest(webResource: WebResourceLike): Promise<WebResourceLike>
Parameters
- webResource
- WebResourceLike
The WebResourceLike to be signed.
Returns
Promise<WebResourceLike>
The signed request object.