mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5279] enhanced oath2 configuration handling (#8575)
* [ACS-5279] enhanced oath2 configuration handling * fix tests * fix schema
This commit is contained in:
@@ -22,6 +22,7 @@ import { Observable, Subject } from 'rxjs';
|
||||
import { map, distinctUntilChanged, take } from 'rxjs/operators';
|
||||
import { ExtensionConfig, ExtensionService, mergeObjects } from '@alfresco/adf-extensions';
|
||||
import { OpenidConfiguration } from '../auth/interfaces/openid-configuration.interface';
|
||||
import { OauthConfigModel } from '../auth/models/oauth-config.model';
|
||||
|
||||
/* spellchecker: disable */
|
||||
// eslint-disable-next-line no-shadow
|
||||
@@ -229,6 +230,23 @@ export class AppConfigService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* OAuth2 configuration
|
||||
*/
|
||||
get oauth2(): OauthConfigModel {
|
||||
const config = this.get(AppConfigValues.OAUTHCONFIG, {});
|
||||
const implicitFlow = config['implicitFlow'] === true || config['implicitFlow'] === 'true';
|
||||
const silentLogin = config['silentLogin'] === true || config['silentLogin'] === 'true';
|
||||
const codeFlow = config['codeFlow'] === true || config['codeFlow'] === 'true';
|
||||
|
||||
return {
|
||||
...(config as OauthConfigModel),
|
||||
implicitFlow,
|
||||
silentLogin,
|
||||
codeFlow
|
||||
};
|
||||
}
|
||||
|
||||
private formatString(str: string, keywords: Map<string, string>): string {
|
||||
let result = str;
|
||||
|
||||
|
Reference in New Issue
Block a user