Skip to content

Commit

Permalink
.getPromptParams
Browse files Browse the repository at this point in the history
Signed-off-by: Amber Torrise <at895452@broadcom.net>
  • Loading branch information
Amber Torrise committed Nov 9, 2023
1 parent b52c7d2 commit 40f2bd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import { ICommandHandler, IHandlerParameters, ICommandArguments } from "../../../../cmd";
import { Constants } from "../../../../constants";
import { AbstractSession, IOptionsForAddConnProps, ISession, SessConstants } from "../../../../rest";
import { ISession, SessConstants } from "../../../../rest";
import { ImperativeError } from "../../../../error";
import { IAuthHandlerApi } from "../doc/IAuthHandlerApi";

Expand Down Expand Up @@ -60,16 +60,6 @@ export abstract class AbstractAuthHandler implements ICommandHandler {
}
}

/**
* This is called by the "config secure" handler when it needs to prompt
* for connection info to obtain an auth token.
* @deprecated Use `getAuthHandlerApi` instead
* @returns A tuple containing:
* - Options for adding connection properties
* - The login handler
*/
public abstract getPromptParams(): [IOptionsForAddConnProps, (session: AbstractSession) => Promise<string>];

/**
* Returns auth handler API that provides convenient functions to create a
* session from args, and use it to login or logout of an auth service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { IHandlerParameters, IHandlerResponseApi } from "../../../../cmd";
import {
AbstractSession,
ConnectionPropsForSessCfg,
IOptionsForAddConnProps,
ISession,
RestConstants,
SessConstants,
Expand Down Expand Up @@ -53,21 +52,6 @@ export abstract class BaseAuthHandler extends AbstractAuthHandler {
*/
protected abstract doLogout(session: AbstractSession): Promise<void>;

/**
* This is called by the "config secure" handler when it needs to prompt
* for connection info to obtain an auth token.
* @deprecated Use `getAuthHandlerApi` instead
* @returns A tuple containing:
* - Options for adding connection properties
* - The login handler
*/
public getPromptParams(): [IOptionsForAddConnProps, (session: AbstractSession) => Promise<string>] {
return [{
defaultTokenType: this.mDefaultTokenType,
serviceDescription: this.mServiceDescription
}, this.doLogin];
}

/**
* Returns auth handler API that provides convenient functions to create a
* session from args, and use it to login or logout of an auth service.
Expand Down

0 comments on commit 40f2bd9

Please sign in to comment.