mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +00:00
Generalize token refreshing to include reauth by api key (#456)
This commit is contained in:
@@ -17,8 +17,9 @@ import { TokenService } from 'jslib-common/abstractions/token.service';
|
||||
export class NodeApiService extends ApiService {
|
||||
constructor(tokenService: TokenService, platformUtilsService: PlatformUtilsService,
|
||||
environmentService: EnvironmentService, logoutCallback: (expired: boolean) => Promise<void>,
|
||||
customUserAgent: string = null) {
|
||||
customUserAgent: string = null, apiKeyRefresh: (clientId: string, clientSecret: string) => Promise<any>) {
|
||||
super(tokenService, platformUtilsService, environmentService, logoutCallback, customUserAgent);
|
||||
this.apiKeyRefresh = apiKeyRefresh;
|
||||
}
|
||||
|
||||
nativeFetch(request: Request): Promise<Response> {
|
||||
|
||||
Reference in New Issue
Block a user