Class DefaultAuthenticationProvider
- java.lang.Object
-
- org.neotropic.kuwaiba.core.authentication.AbstractAuthenticationProvider
-
- org.neotropic.kuwaiba.core.authentication.DefaultAuthenticationProvider
-
public class DefaultAuthenticationProvider extends AbstractAuthenticationProvider
Authenticates users using the built-in database.- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureProvider(HashMap<String,Object> parameters)
Sets the parameters necessary for the authentication to work (database handle, Active Directory settings, etc).Session
login(String user, String password, int sessionType)
Attempts to authenticate a user.
-
-
-
Method Detail
-
configureProvider
public void configureProvider(HashMap<String,Object> parameters) throws AuthenticationException
Description copied from class:AbstractAuthenticationProvider
Sets the parameters necessary for the authentication to work (database handle, Active Directory settings, etc).- Specified by:
configureProvider
in classAbstractAuthenticationProvider
- Parameters:
parameters
- The Application Entity Manager as aem.- Throws:
AuthenticationException
- If the aem variable is not supplied and it's not the expected type.
-
login
public Session login(String user, String password, int sessionType) throws AuthenticationException
Description copied from class:AbstractAuthenticationProvider
Attempts to authenticate a user.- Specified by:
login
in classAbstractAuthenticationProvider
- Parameters:
user
- The user.password
- The password.sessionType
- The session type (web, desktop, web service, other)- Returns:
- A session object containing the user profile and its privileges, basically.
- Throws:
AuthenticationException
- If the authentication process is incorrect.
-
-