TokenAuth
Upgather SDK / TokenAuth
Class: TokenAuth
Defined in: lib/auth/TokenAuth.ts:11
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
Defined in: lib/auth/TokenAuth.ts:20
Creates an instance of TokenAuth.
Parameters
token
string
The authentication token.
Returns
Methods
authenticate()
authenticate(
request):void
Defined in: lib/auth/TokenAuth.ts:29
Applies the token to the HTTP request.
Parameters
request
The HTTP request to authenticate.
Returns
void