Skip to main content

TokenAuth

Upgather SDK


Upgather SDK / TokenAuth

Class: TokenAuth

Provides a token-based authentication strategy.

Remarks​

This class implements the AuthStrategy interface and applies a token to an HTTP request for authentication purposes.

Implements​

Constructors​

new TokenAuth()​

new TokenAuth(token): TokenAuth

Creates an instance of TokenAuth.

Parameters​

token​

string

The authentication token.

Returns​

TokenAuth

Methods​

authenticate()​

authenticate(request): void

Applies the token to the HTTP request.

Parameters​

request​

HttpRequest

The HTTP request to authenticate.

Returns​

void

Implementation of​

AuthStrategy.authenticate