|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.authentication.AuthenticationHandler
public abstract class AuthenticationHandler
An AuthenticationHandler is an object that perform user authentification.
JCMS manages a list of AuthenticationHandler sorted using the natural order provided by
this abstract class using the order parameter of the constructor.
Use this order parameter to modify the position of your handler in the authentication
chain.
Override one or both of the following methods to provide your own authentication mecanism :
loadProperties()
method can be overridden to load/reload properties as needed.
Field Summary | |
---|---|
protected static Channel |
channel
|
static String |
GENERIC_BAD_AUTHENTICATION_MSG
Use this constant with AuthenticationContext.setWarningMsg(String)
to provide a generic authentication failure message. |
static String |
REVISION
|
Constructor Summary | |
---|---|
AuthenticationHandler()
Creates a new AuthenticationHandler. The default order of this new handler is 0. |
|
AuthenticationHandler(int order)
Constructs a AuthenticationHandler with the specified order. |
Method Summary | |
---|---|
int |
compareTo(AuthenticationHandler authHdlr)
Compare this object with the specified AuthenticationHandler for order. |
boolean |
equals(Object obj)
Indicates wheter some other object is "equal to" this one. |
int |
getOrder()
Retrieve the order used by this AuthenticationHandler. |
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration |
void |
loadProperties()
This method will be called by the AuthenticationManager each time the Channel properties are loaded/reloaded. You can use it to reload properties that might have been changed. This method is called during initialization of the AuthenticationManager |
void |
login(AuthenticationContext ctxt)
Authenticate a member. |
void |
logout(AuthenticationContext ctxt)
This methods is called when users logout from JCMS. |
void |
setOrder(int order)
Modify the order used by this AuthenticationHandler. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String GENERIC_BAD_AUTHENTICATION_MSG
AuthenticationContext.setWarningMsg(String)
to provide a generic authentication failure message.
protected static final Channel channel
Constructor Detail |
---|
public AuthenticationHandler()
public AuthenticationHandler(int order)
order
- an integer used by the natural comparator of this AuthenticationHandler
to sort all AuthenticationHandler managed by the AuthenticationManager
.Method Detail |
---|
public void loadProperties()
public boolean init(Plugin plugin)
PluginComponent
init
in interface PluginComponent
plugin
- the calling plugin
public void login(AuthenticationContext ctxt) throws IOException
AuthenticationContext
object (request, response, login.. etc) AuthenticationContext.setLoggedMember(com.jalios.jcms.Member)
AuthenticationContext.doChain()
,AuthenticationContext
.
ctxt
- the AuthenticationContext
used for this login
IOException
public void logout(AuthenticationContext ctxt) throws IOException
ctxt
- the AuthenticationContext
used for this login
IOException
public final int compareTo(AuthenticationHandler authHdlr)
compareTo
in interface Comparable<AuthenticationHandler>
authHdlr
- the AuthenticationHandler to be compared.Comparable.compareTo(java.lang.Object)
public final boolean equals(Object obj)
equals
in class Object
obj
- the Object to be compared.public int getOrder()
public void setOrder(int order)
order
- the new order to use for this AuthenticationHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |