UNPKG

@flexbase/http-client-middleware

Version:
13 lines (12 loc) 720 B
import { AuthenticationToken } from './authentication.token.js'; import { AuthenticationTokenAccessor } from './authentication.token.accessor.js'; /** @ignore */ export declare abstract class AuthenticationTokenAccessorBase<Credentials> implements AuthenticationTokenAccessor<Credentials> { validateToken(token: AuthenticationToken | null): Promise<boolean>; protected abstract generateBody(credentials: Credentials, refreshToken: string | undefined): { url: string; body: Record<string, any>; }; protected coerceResponse(tokenResponse: any): AuthenticationToken | null; requestToken(credentials: Credentials, refreshToken: string | undefined): Promise<AuthenticationToken | null>; }