1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-18 17:23:27 +00:00

[AC-3043] Refactor AuthService to only use organization api key login (#622)

* 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
This commit is contained in:
Thomas Rittson
2024-09-23 08:46:38 +10:00
committed by GitHub
parent 9dc497dd13
commit 4652c6489f
33 changed files with 195 additions and 2026 deletions

View File

@@ -1,11 +1,10 @@
import * as inquirer from "inquirer";
import { AuthService } from "@/jslib/common/src/abstractions/auth.service";
import { ApiLogInCredentials } from "@/jslib/common/src/models/domain/logInCredentials";
import { Response } from "@/jslib/node/src/cli/models/response";
import { MessageResponse } from "@/jslib/node/src/cli/models/response/messageResponse";
import { Utils } from "../../jslib/common/src/misc/utils";
import { AuthService } from "../abstractions/auth.service";
export class LoginCommand {
private canInteract: boolean;
@@ -26,7 +25,7 @@ export class LoginCommand {
}
try {
await this.authService.logIn(new ApiLogInCredentials(clientId, clientSecret));
await this.authService.logIn({ clientId, clientSecret });
const res = new MessageResponse("You are logged in!", null);
return Response.success(res);