fix: remove redirect uri validator (#754)

* fix: remove redirect uri validator

* fix: remove redirect uri validator
This commit is contained in:
Fabi 2020-09-18 10:20:45 +02:00 committed by GitHub
parent e7b499794d
commit 1d542a0c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View File

@ -19,7 +19,6 @@ import { ManagementService } from 'src/app/services/mgmt.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { AppSecretDialogComponent } from '../app-secret-dialog/app-secret-dialog.component'; import { AppSecretDialogComponent } from '../app-secret-dialog/app-secret-dialog.component';
import { nativeValidator, webValidator } from '../appTypeValidator';
@Component({ @Component({
selector: 'app-app-create', selector: 'app-app-create',
@ -120,8 +119,8 @@ export class AppCreateComponent implements OnInit, OnDestroy {
[OIDCGrantType.OIDCGRANTTYPE_AUTHORIZATION_CODE]; [OIDCGrantType.OIDCGRANTTYPE_AUTHORIZATION_CODE];
this.oidcApp.authMethodType = OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE; this.oidcApp.authMethodType = OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE;
this.redirectControl = new FormControl('', [nativeValidator as ValidatorFn]); // this.redirectControl = new FormControl('', [nativeValidator as ValidatorFn]);
this.postRedirectControl = new FormControl('', [nativeValidator as ValidatorFn]); // this.postRedirectControl = new FormControl('', [nativeValidator as ValidatorFn]);
break; break;
case OIDCApplicationType.OIDCAPPLICATIONTYPE_WEB: case OIDCApplicationType.OIDCAPPLICATIONTYPE_WEB:
this.oidcAuthMethodType[0].disabled = false; this.oidcAuthMethodType[0].disabled = false;
@ -137,8 +136,8 @@ export class AppCreateComponent implements OnInit, OnDestroy {
this.oidcApp.grantTypesList = this.oidcApp.grantTypesList =
[OIDCGrantType.OIDCGRANTTYPE_AUTHORIZATION_CODE]; [OIDCGrantType.OIDCGRANTTYPE_AUTHORIZATION_CODE];
this.redirectControl = new FormControl('', [webValidator as ValidatorFn]); // this.redirectControl = new FormControl('', [webValidator as ValidatorFn]);
this.postRedirectControl = new FormControl('', [webValidator as ValidatorFn]); // this.postRedirectControl = new FormControl('', [webValidator as ValidatorFn]);
break; break;
case OIDCApplicationType.OIDCAPPLICATIONTYPE_USER_AGENT: case OIDCApplicationType.OIDCAPPLICATIONTYPE_USER_AGENT:
this.oidcResponseTypes[0].checked = true; this.oidcResponseTypes[0].checked = true;
@ -149,8 +148,8 @@ export class AppCreateComponent implements OnInit, OnDestroy {
this.oidcApp.authMethodType = OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE; this.oidcApp.authMethodType = OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE;
this.redirectControl = new FormControl('', [webValidator as ValidatorFn]); // this.redirectControl = new FormControl('', [webValidator as ValidatorFn]);
this.postRedirectControl = new FormControl('', [webValidator as ValidatorFn]); // this.postRedirectControl = new FormControl('', [webValidator as ValidatorFn]);
break; break;
} }

View File

@ -22,7 +22,6 @@ import { ManagementService } from 'src/app/services/mgmt.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { AppSecretDialogComponent } from '../app-secret-dialog/app-secret-dialog.component'; import { AppSecretDialogComponent } from '../app-secret-dialog/app-secret-dialog.component';
import { nativeValidator } from '../appTypeValidator';
enum RedirectType { enum RedirectType {
REDIRECT = 'redirect', REDIRECT = 'redirect',
@ -134,11 +133,11 @@ export class AppDetailComponent implements OnInit, OnDestroy {
if (this.app.oidcConfig?.redirectUrisList) { if (this.app.oidcConfig?.redirectUrisList) {
this.redirectUrisList = this.app.oidcConfig.redirectUrisList; this.redirectUrisList = this.app.oidcConfig.redirectUrisList;
this.redirectControl = new FormControl('', [nativeValidator as ValidatorFn]); // this.redirectControl = new FormControl('', [nativeValidator as ValidatorFn]);
} }
if (this.app.oidcConfig?.postLogoutRedirectUrisList) { if (this.app.oidcConfig?.postLogoutRedirectUrisList) {
this.postLogoutRedirectUrisList = this.app.oidcConfig.postLogoutRedirectUrisList; this.postLogoutRedirectUrisList = this.app.oidcConfig.postLogoutRedirectUrisList;
this.postRedirectControl = new FormControl('', [nativeValidator as ValidatorFn]); // this.postRedirectControl = new FormControl('', [nativeValidator as ValidatorFn]);
} }
if (this.app.oidcConfig) { if (this.app.oidcConfig) {
this.appForm.patchValue(this.app.oidcConfig); this.appForm.patchValue(this.app.oidcConfig);