|
@@ -57,7 +57,9 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
|
@@ -57,7 +57,9 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
57
|
private subscriptions: Subscription[] = [];
|
57
|
private subscriptions: Subscription[] = [];
|
58
|
private templates = new Map<string, ClientProviderTemplated>();
|
58
|
private templates = new Map<string, ClientProviderTemplated>();
|
59
|
private defaultProvider = {
|
59
|
private defaultProvider = {
|
60
|
- providerName: 'Custom',
|
60
|
+ additionalInfo: {
|
|
|
61
|
+ providerName: 'Custom'
|
|
|
62
|
+ },
|
61
|
clientAuthenticationMethod: 'Post',
|
63
|
clientAuthenticationMethod: 'Post',
|
62
|
userNameAttributeName: 'email',
|
64
|
userNameAttributeName: 'email',
|
63
|
mapperConfig: {
|
65
|
mapperConfig: {
|
|
@@ -105,7 +107,6 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
|
@@ -105,7 +107,6 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
105
|
this.initTemplates(templates);
|
107
|
this.initTemplates(templates);
|
106
|
this.oauth2Settings = oauth2Settings;
|
108
|
this.oauth2Settings = oauth2Settings;
|
107
|
this.initOAuth2Settings(this.oauth2Settings);
|
109
|
this.initOAuth2Settings(this.oauth2Settings);
|
108
|
- // this.oauth2SettingsForm.get('clientDomains').updateValueAndValidity();
|
|
|
109
|
}
|
110
|
}
|
110
|
);
|
111
|
);
|
111
|
}
|
112
|
}
|
|
@@ -300,7 +301,13 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
|
@@ -300,7 +301,13 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
300
|
clientRegistration.get('authorizationUri').disable();
|
301
|
clientRegistration.get('authorizationUri').disable();
|
301
|
clientRegistration.get('jwkSetUri').disable();
|
302
|
clientRegistration.get('jwkSetUri').disable();
|
302
|
clientRegistration.get('userInfoUri').disable();
|
303
|
clientRegistration.get('userInfoUri').disable();
|
303
|
- clientRegistration.patchValue(this.templates.get(provider), {emitEvent: false});
|
304
|
+ clientRegistration.patchValue({
|
|
|
305
|
+ ...template, ...{
|
|
|
306
|
+ clientId: '',
|
|
|
307
|
+ clientSecret: '',
|
|
|
308
|
+ id: {id: null, entityType: null}
|
|
|
309
|
+ }
|
|
|
310
|
+ }, {emitEvent: false});
|
304
|
}
|
311
|
}
|
305
|
}));
|
312
|
}));
|
306
|
|
313
|
|
|
@@ -477,6 +484,9 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
|
@@ -477,6 +484,9 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha |
477
|
|
484
|
|
478
|
getHelpLink(controller: AbstractControl): string {
|
485
|
getHelpLink(controller: AbstractControl): string {
|
479
|
const provider = controller.get('additionalInfo.providerName').value;
|
486
|
const provider = controller.get('additionalInfo.providerName').value;
|
|
|
487
|
+ if (provider === null || provider === 'Custom') {
|
|
|
488
|
+ return '';
|
|
|
489
|
+ }
|
480
|
return this.templates.get(provider).helpLink;
|
490
|
return this.templates.get(provider).helpLink;
|
481
|
}
|
491
|
}
|
482
|
} |
492
|
} |