mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 19:58:59 +00:00
dummy login module
This commit is contained in:
parent
5c78e38e81
commit
9a66bbfa3f
30
wherehows-frontend/app/security/DummyLoginModule.java
Normal file
30
wherehows-frontend/app/security/DummyLoginModule.java
Normal file
@ -0,0 +1,30 @@
|
||||
package security;
|
||||
|
||||
import javax.security.auth.Subject;
|
||||
import javax.security.auth.callback.CallbackHandler;
|
||||
import javax.security.auth.login.LoginException;
|
||||
import javax.security.auth.spi.LoginModule;
|
||||
import java.util.Map;
|
||||
|
||||
public class DummyLoginModule implements LoginModule {
|
||||
|
||||
public void initialize(final Subject subject, final CallbackHandler callbackHandler, final Map<String, ?> sharedState, final Map<String, ?> options) {
|
||||
}
|
||||
|
||||
public boolean login() throws LoginException {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean commit() throws LoginException {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean abort() throws LoginException {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean logout() throws LoginException {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
// This is just a sample JAAS config that uses LDAP for authentication.
|
||||
WHZ-Authentication {
|
||||
security.DummyLoginModule sufficient;
|
||||
|
||||
com.sun.security.auth.module.LdapLoginModule sufficient
|
||||
userProvider="ldap://ldap-svr/ou=people,dc=example,dc=com"
|
||||
authIdentity="{USERNAME}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user