Class AuthenticationMethod
- java.lang.Object
-
- net.sf.basedb.core.authentication.AuthenticationMethod
-
public class AuthenticationMethod extends Object
Holds information about the method that was used to verify a user when logging in. SeeSessionControl.getAuthenticationMethod()
. TheINTERNAL
is method is a static constant used when the regular internal username/password verification is used. TheEXTERNAL
is a generic external verification but externalAuthenticationManager
:s are encouraged to define their own authentication methods.- Since:
- 3.3
- Author:
- Nicklas
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticationMethod
EXTERNAL
This is a generic external authentication method.static AuthenticationMethod
INTERNAL
This is special-case internal login used by job queue, etc.private String
method
private static Map<String,AuthenticationMethod>
methods
static AuthenticationMethod
PASSWORD
This is the regular internal username/password verification authentication method.
-
Constructor Summary
Constructors Modifier Constructor Description private
AuthenticationMethod(String method)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthenticationMethod
getInstance(String method)
Get an instance of this class for the given authentication method.String
getMethod()
Get the name of the authentication method.String
toString()
-
-
-
Field Detail
-
methods
private static Map<String,AuthenticationMethod> methods
-
INTERNAL
public static AuthenticationMethod INTERNAL
This is special-case internal login used by job queue, etc.- Since:
- 3.9
-
PASSWORD
public static AuthenticationMethod PASSWORD
This is the regular internal username/password verification authentication method.- Since:
- 3.9
-
EXTERNAL
public static AuthenticationMethod EXTERNAL
This is a generic external authentication method.AuthenticationManager
:s are encouraged to define their own authentication methods.
-
method
private final String method
-
-
Constructor Detail
-
AuthenticationMethod
private AuthenticationMethod(String method)
-
-
Method Detail
-
getInstance
public static final AuthenticationMethod getInstance(String method)
Get an instance of this class for the given authentication method. If no method with that name exists a new method is created.- Parameters:
method
- The name of the method
-
getMethod
public String getMethod()
Get the name of the authentication method.
-
-