Removing implicitFlow in favor of codeFlow

This commit is contained in:
VitoAlbano
2024-06-17 22:17:56 +01:00
parent 6bd72e06b7
commit a28a013a11
5 changed files with 33 additions and 59 deletions

View File

@@ -67,16 +67,10 @@
<mat-slide-toggle class="adf-full-width" name="silentLogin" formControlName="silentLogin">
</mat-slide-toggle>
<mat-label>Implicit Flow</mat-label>
<mat-slide-toggle class="adf-full-width" name="implicitFlow" formControlName="implicitFlow">
<mat-label>Code Flow</mat-label>
<mat-slide-toggle class="adf-full-width" name="codeFlow" formControlName="codeFlow">
</mat-slide-toggle>
<ng-container *ngIf="isOAUTH">
<mat-label>Code Flow</mat-label>
<mat-slide-toggle class="adf-full-width" name="codeFlow" formControlName="codeFlow">
</mat-slide-toggle>
</ng-container>
<mat-form-field class="adf-full-width">
<mat-label>Redirect URI</mat-label>
<input matInput name="redirectUri" formControlName="redirectUri">

View File

@@ -150,7 +150,6 @@ export class HostSettingsComponent implements OnInit {
scope: [oauth.scope, Validators.required],
secret: oauth.secret,
silentLogin: oauth.silentLogin,
implicitFlow: oauth.implicitFlow,
codeFlow: oauth.codeFlow,
publicUrls: [oauth.publicUrls]
});
@@ -161,7 +160,10 @@ export class HostSettingsComponent implements OnInit {
}
private createIdentityFormControl(): UntypedFormControl {
return new UntypedFormControl(this.appConfig.get<string>(AppConfigValues.IDENTITY_HOST), [Validators.required, Validators.pattern(HOST_REGEX)]);
return new UntypedFormControl(this.appConfig.get<string>(AppConfigValues.IDENTITY_HOST), [
Validators.required,
Validators.pattern(HOST_REGEX)
]);
}
private createECMFormControl(): UntypedFormControl {
@@ -203,7 +205,7 @@ export class HostSettingsComponent implements OnInit {
}
private saveOAuthValues(values: any) {
if (values.oauthConfig.publicUrls && (typeof values.oauthConfig.publicUrls === 'string')) {
if (values.oauthConfig.publicUrls && typeof values.oauthConfig.publicUrls === 'string') {
values.oauthConfig.publicUrls = values.oauthConfig.publicUrls.split(',');
}
@@ -278,5 +280,4 @@ export class HostSettingsComponent implements OnInit {
get oauthConfig(): UntypedFormControl {
return this.form.get('oauthConfig') as UntypedFormControl;
}
}