1
0
mirror of https://github.com/bitwarden/directory-connector synced 2026-02-26 17:23:15 +00:00
Files
directory-connector/src-cli/commands/logout.command.ts
2026-02-26 11:29:30 -05:00

21 lines
567 B
TypeScript

import { AuthService } from "@/libs/abstractions/auth.service";
import { Response } from "@/src-cli/cli/models/response";
import { MessageResponse } from "@/src-cli/cli/models/response/messageResponse";
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);
}
}