Class AbstractAuthenticationProvider
- java.lang.Object
-
- org.neotropic.kuwaiba.core.authentication.AbstractAuthenticationProvider
-
- Direct Known Subclasses:
DefaultAuthenticationProvider,LdapAuthenticationProvider
public abstract class AbstractAuthenticationProvider extends Object
Defines the general behavior of the classes that will authenticate users against different providers, such an Active Directory or the built-in database.- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidconfigureProvider(HashMap<String,Object> parameters)Sets the parameters necessary for the authentication to work (database handle, Active Directory settings, etc).abstract Sessionlogin(String user, String password, int sessionType)Attempts to authenticate a user.
-
-
-
Method Detail
-
configureProvider
public abstract void configureProvider(HashMap<String,Object> parameters) throws AuthenticationException
Sets the parameters necessary for the authentication to work (database handle, Active Directory settings, etc).- Parameters:
parameters- The set of parameters. The implementor must document what is required.- Throws:
AuthenticationException- If something goes wrong, most likely, the parameters are insufficient or not correct.
-
login
public abstract Session login(String user, String password, int sessionType) throws AuthenticationException
Attempts to authenticate a user.- 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.
-
-