mirror of
https://github.com/bitwarden/directory-connector
synced 2026-01-20 17:33:36 +00:00
* Remove jslib authService and unused loginStrategies * Delete KeyConnectorService * Move OrganizationLoginStrategy into base LoginStrategy * Remove unused code and services from loginStrategy * Delete OrganizationService * Move loginStrategy into authService
22 lines
578 B
TypeScript
22 lines
578 B
TypeScript
|
|
import { Response } from "@/jslib/node/src/cli/models/response";
|
|
import { MessageResponse } from "@/jslib/node/src/cli/models/response/messageResponse";
|
|
|
|
import { AuthService } from "../abstractions/auth.service";
|
|
|
|
export class LogoutCommand {
|
|
constructor(
|
|
private authService: AuthService,
|
|
private logoutCallback: () => Promise<void>,
|
|
) {}
|
|
|
|
async run() {
|
|
await this.logoutCallback();
|
|
this.authService.logOut(() => {
|
|
/* Do nothing */
|
|
});
|
|
const res = new MessageResponse("You have logged out.", null);
|
|
return Response.success(res);
|
|
}
|
|
}
|