allow none for web flow (#620)

This commit is contained in:
Max Peintner
2020-08-24 08:10:45 +02:00
committed by GitHub
parent 6362ec7662
commit d49fee23bf
4 changed files with 12 additions and 80 deletions

View File

@@ -125,9 +125,9 @@ export class AppCreateComponent implements OnInit, OnDestroy {
break;
case OIDCApplicationType.OIDCAPPLICATIONTYPE_WEB:
this.oidcAuthMethodType[0].disabled = false;
this.oidcAuthMethodType[1].disabled = true; // NONE DISABLED
this.oidcAuthMethodType[2].disabled = false; // POST POSSIBLE
this.authMethodType?.setValue(OIDCAuthMethodType.OIDCAUTHMETHODTYPE_BASIC); // BASIC DEFAULT
this.oidcAuthMethodType[1].disabled = false;
this.oidcAuthMethodType[2].disabled = false;
this.authMethodType?.setValue(OIDCAuthMethodType.OIDCAUTHMETHODTYPE_BASIC);
this.oidcApp.authMethodType = OIDCAuthMethodType.OIDCAUTHMETHODTYPE_BASIC;
this.oidcResponseTypes[0].checked = true;
@@ -190,7 +190,12 @@ export class AppCreateComponent implements OnInit, OnDestroy {
.CreateOIDCApp(this.oidcApp)
.then((data: Application) => {
this.loading = false;
this.showSavedDialog(data.toObject());
const response = data.toObject();
if (response.oidcConfig?.authMethodType !== OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE) {
this.showSavedDialog(response);
} else {
this.router.navigate(['projects', this.projectId, 'apps', response.id]);
}
})
.catch(error => {
this.loading = false;

View File

@@ -40,7 +40,8 @@
</app-card>
<app-card title="{{ 'APP.OIDC.TITLE' | translate }}" *ngIf="app && app.oidcConfig">
<div class="card-actions" card-actions>
<div class="card-actions" card-actions
*ngIf="app?.oidcConfig.authMethodType !== OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE">
<button mat-stroked-button
(click)="regenerateOIDCClientSecret()">{{'APP.OIDC.REGENERATESECRET' | translate}}</button>
</div>

View File

@@ -78,6 +78,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
public docs!: ZitadelDocs.AsObject;
public OIDCApplicationType: any = OIDCApplicationType;
public OIDCAuthMethodType: any = OIDCAuthMethodType;
public redirectControl: FormControl = new FormControl('');
public postRedirectControl: FormControl = new FormControl('');