Package step.core.access
Class AuthenticationManager
- java.lang.Object
-
- step.core.access.AuthenticationManager
-
public class AuthenticationManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AuthenticationManager.AuthenticationManagerListener
-
Constructor Summary
Constructors Constructor Description AuthenticationManager(ch.exense.commons.app.Configuration configuration, ch.commons.auth.Authenticator authenticator, UserAccessor userAccessor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(Session session, ch.commons.auth.Credentials credentials)
void
authenticateDefaultUserIfAuthenticationIsDisabled(Session session)
static User
defaultAdminUser()
java.lang.String
encryptPwd(java.lang.String pwd)
java.lang.String
getAuthenticatorName()
protected void
logoutSession(Session session)
boolean
registerListener(AuthenticationManager.AuthenticationManagerListener e)
java.lang.String
resetPwd(User user)
protected void
setUserToSession(Session session, java.lang.String username)
boolean
useAuthentication()
-
-
-
Constructor Detail
-
AuthenticationManager
public AuthenticationManager(ch.exense.commons.app.Configuration configuration, ch.commons.auth.Authenticator authenticator, UserAccessor userAccessor)
-
-
Method Detail
-
useAuthentication
public boolean useAuthentication()
-
getAuthenticatorName
public java.lang.String getAuthenticatorName()
-
authenticate
public boolean authenticate(Session session, ch.commons.auth.Credentials credentials) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setUserToSession
protected void setUserToSession(Session session, java.lang.String username)
-
logoutSession
protected void logoutSession(Session session)
-
authenticateDefaultUserIfAuthenticationIsDisabled
public void authenticateDefaultUserIfAuthenticationIsDisabled(Session session)
-
defaultAdminUser
public static User defaultAdminUser()
-
resetPwd
public java.lang.String resetPwd(User user)
-
encryptPwd
public java.lang.String encryptPwd(java.lang.String pwd)
-
registerListener
public boolean registerListener(AuthenticationManager.AuthenticationManagerListener e)
-
-