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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user