mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-21 02:33:14 +00:00
Refresh token with api key (#135)
* Do not persist client creds on logout * Override refreshing token flow with re-authentication flow * Update jslib * PR review comments
This commit is contained in:
16
src/services/nodeApi.service.ts
Normal file
16
src/services/nodeApi.service.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { TokenService } from 'jslib-common/abstractions/token.service';
|
||||
|
||||
import { NodeApiService as NodeApiServiceBase } from 'jslib-node/services/nodeApi.service';
|
||||
|
||||
export class NodeApiService extends NodeApiServiceBase {
|
||||
constructor(tokenService: TokenService, platformUtilsService: PlatformUtilsService,
|
||||
private refreshTokenCallback: () => Promise<void>, logoutCallback: (expired: boolean) => Promise<void>,
|
||||
customUserAgent: string = null) {
|
||||
super(tokenService, platformUtilsService, logoutCallback, customUserAgent);
|
||||
}
|
||||
|
||||
doRefreshToken(): Promise<void> {
|
||||
return this.refreshTokenCallback();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user