Type alias AuthTokens

AuthTokens: {
    accessToken: string;
    headers: {
        [key: string]: string;
    };
}

Represents authentication tokens containing an access token and additional headers.

Type declaration

  • accessToken: string
  • headers: {
        [key: string]: string;
    }
    • [key: string]: string

Example

const authTokens: AuthTokens = {
accessToken: 'your_access_token',
headers: {
'Custom-Header': 'value',
// other headers...
},
}

// Usage in an HTTP request
const requestOptions: RequestOptions = {
headers: { ...authTokens.headers, Authorization: `Bearer ${authTokens.accessToken}` },
// other request options...
}

Generated using TypeDoc