MCPcopy
hub / github.com/redis/node-redis / TestIdentityProvider

Class TestIdentityProvider

packages/client/lib/authx/token-manager.spec.ts:20–24  ·  view source on GitHub ↗

* IdentityProvider that returns a fixed test token for testing and doesn't handle TTL.

Source from the content-addressed store, hash-verified

18 * IdentityProvider that returns a fixed test token for testing and doesn't handle TTL.
19 */
20 class TestIdentityProvider implements IdentityProvider<string> {
21 requestToken(): Promise<TokenResponse<string>> {
22 return Promise.resolve({ token: 'test-token 1', ttlMs: 1000 });
23 }
24 }
25
26 /**
27 * Helper function to create a test token with a given TTL .

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected