2023-02-24 11:37:19 -08:00
|
|
|
import config from '@/config';
|
|
|
|
|
|
|
|
export function isSamlCurrentAuthenticationMethod(): boolean {
|
|
|
|
return config.getEnv('userManagement.authenticationMethod') === 'saml';
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isSsoJustInTimeProvisioningEnabled(): boolean {
|
|
|
|
return config.getEnv('sso.justInTimeProvisioning');
|
|
|
|
}
|
|
|
|
|
|
|
|
export function doRedirectUsersFromLoginToSsoFlow(): boolean {
|
|
|
|
return config.getEnv('sso.redirectLoginToSso');
|
|
|
|
}
|
2023-03-03 01:05:30 -08:00
|
|
|
|
|
|
|
export function setCurrentAuthenticationMethod(
|
|
|
|
authenticationMethod: 'email' | 'ldap' | 'saml',
|
|
|
|
): void {
|
|
|
|
config.set('userManagement.authenticationMethod', authenticationMethod);
|
|
|
|
}
|