2021-08-20 10:58:07 -07:00
|
|
|
package auth;
|
2021-03-11 13:38:35 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Currently, this config enables or disable custom Java Authentication and Authorization Service
|
|
|
|
* authentication that has traditionally existed in DH.
|
|
|
|
*/
|
|
|
|
public class JAASConfigs {
|
|
|
|
|
|
|
|
public static final String JAAS_ENABLED_CONFIG_PATH = "auth.jaas.enabled";
|
|
|
|
|
|
|
|
private Boolean _isEnabled = true;
|
|
|
|
|
|
|
|
public JAASConfigs(final com.typesafe.config.Config configs) {
|
2022-06-16 22:07:49 +03:00
|
|
|
if (configs.hasPath(JAAS_ENABLED_CONFIG_PATH) && !configs.getBoolean(JAAS_ENABLED_CONFIG_PATH)) {
|
2021-03-11 13:38:35 -08:00
|
|
|
_isEnabled = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isJAASEnabled() {
|
|
|
|
return _isEnabled;
|
|
|
|
}
|
|
|
|
}
|