Skip to content

Commit

Permalink
only set tokenType if undefined
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed Jul 18, 2023
1 parent 36858a0 commit 8f60ca3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/config/auto-init/ApimlAutoInitHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export default class ApimlAutoInitHandler extends BaseAutoInitHandler {
if ((session.ISession.user && session.ISession.password) || (session.ISession.cert && session.ISession.certKey)) {
// If it is basic authentication, we need to set the auth type.
if (session.ISession.password) { session.ISession.type = SessConstants.AUTH_TYPE_TOKEN; }
session.ISession.tokenType = SessConstants.TOKEN_TYPE_APIML;
if (session.ISession.tokenType == null) {
session.ISession.tokenType = SessConstants.TOKEN_TYPE_APIML;
}
session.ISession.storeCookie = true;
session.ISession.tokenValue = await Login.apimlLogin(session);
session.ISession.storeCookie = false;
Expand Down

0 comments on commit 8f60ca3

Please sign in to comment.