fix(login): Removed login with username/password from prod builds

This commit is contained in:
Erik Tiekstra
2021-12-15 08:31:34 +01:00
parent 5994e6f8c9
commit a6f37923ab
4 changed files with 7 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
Bank-id Bank-id
</ui-link-button> </ui-link-button>
</li> </li>
<li> <li *ngIf="passwordLoginActive">
<ui-link-button <ui-link-button
class="login__button" class="login__button"
uiSize="l" uiSize="l"

View File

@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { environment } from '@msfa-environment'; import { environment } from '@msfa-environment';
import { UiIconType } from '@ui/icon/icon-type.enum';
import { UiIconSize } from '@ui/icon/icon-size.enum'; import { UiIconSize } from '@ui/icon/icon-size.enum';
import { UiIconType } from '@ui/icon/icon-type.enum';
@Component({ @Component({
selector: 'msfa-login', selector: 'msfa-login',
@@ -17,4 +17,5 @@ export class LoginComponent {
mobileBankIdLink = `${this._baseLoginUrl}&acr_values=bankid-mobile`; mobileBankIdLink = `${this._baseLoginUrl}&acr_values=bankid-mobile`;
bankIdLink = `${this._baseLoginUrl}&acr_values=bankid`; bankIdLink = `${this._baseLoginUrl}&acr_values=bankid`;
passwordLink = `${this._baseLoginUrl}&acr_values=password`; passwordLink = `${this._baseLoginUrl}&acr_values=password`;
passwordLoginActive = environment.ciam.passwordLoginActive;
} }

View File

@@ -4,4 +4,5 @@ export interface Ciam {
logoutUrl: string; logoutUrl: string;
selfServiceUrl: string; selfServiceUrl: string;
refreshUrl: string; refreshUrl: string;
passwordLoginActive: boolean;
} }

View File

@@ -6,6 +6,7 @@ export const CIAM_TEST: Ciam = {
logoutUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/logout', logoutUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/logout',
selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service', selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service',
refreshUrl: '/refreshToken', refreshUrl: '/refreshToken',
passwordLoginActive: true,
}; };
export const CIAM_PROD: Ciam = { export const CIAM_PROD: Ciam = {
@@ -14,6 +15,7 @@ export const CIAM_PROD: Ciam = {
logoutUrl: 'https://ciam.arbetsformedlingen.se/uas/logout', logoutUrl: 'https://ciam.arbetsformedlingen.se/uas/logout',
selfServiceUrl: 'https://ciam.arbetsformedlingen.se/eidm2/wf/self-service', selfServiceUrl: 'https://ciam.arbetsformedlingen.se/eidm2/wf/self-service',
refreshUrl: '/refreshToken', refreshUrl: '/refreshToken',
passwordLoginActive: false,
}; };
export const CIAM_MOCK: Ciam = { export const CIAM_MOCK: Ciam = {
@@ -22,4 +24,5 @@ export const CIAM_MOCK: Ciam = {
logoutUrl: '/mock-login', logoutUrl: '/mock-login',
selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service', selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service',
refreshUrl: '/refreshToken', refreshUrl: '/refreshToken',
passwordLoginActive: true,
}; };