-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into clean-complete
- Loading branch information
Showing
87 changed files
with
4,308 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
datahub-frontend/app/auth/NativeAuthenticationConfigs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package auth; | ||
|
||
/** | ||
* Currently, this config enables or disable native user authentication. | ||
*/ | ||
public class NativeAuthenticationConfigs { | ||
|
||
public static final String NATIVE_AUTHENTICATION_ENABLED_CONFIG_PATH = "auth.native.enabled"; | ||
|
||
private Boolean _isEnabled = true; | ||
|
||
public NativeAuthenticationConfigs(final com.typesafe.config.Config configs) { | ||
if (configs.hasPath(NATIVE_AUTHENTICATION_ENABLED_CONFIG_PATH) | ||
&& Boolean.FALSE.equals( | ||
Boolean.parseBoolean(configs.getValue(NATIVE_AUTHENTICATION_ENABLED_CONFIG_PATH).toString()))) { | ||
_isEnabled = false; | ||
} | ||
} | ||
|
||
public boolean isNativeAuthenticationEnabled() { | ||
return _isEnabled; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.