org.esupportail.cas.server.handlers.example
Class ExampleHandler
java.lang.Object
org.esupportail.cas.server.util.log.Debug
org.esupportail.cas.server.util.BasicHandler
org.esupportail.cas.server.handlers.example.ExampleHandler
public final class ExampleHandler
- extends BasicHandler
This class implements a very simple handler accepting one
particular login/password.
- Author:
- Pascal Aubry
|
Field Summary |
private java.lang.String |
login
the only netId that the handler will accept |
private java.lang.String |
password
the associated password |
|
Constructor Summary |
ExampleHandler(org.dom4j.Element handlerElement,
java.lang.Boolean configDebug)
Analyse the XML configuration to set netId and password attributes (constructor). |
|
Method Summary |
int |
authenticate(java.lang.String userLogin,
java.lang.String userPassword)
Try to authenticate a user (compare with the local credentials). |
| Methods inherited from class org.esupportail.cas.server.util.log.Debug |
checkClass, elementDebugValue, isDebug, setDebug, trace, trace, traceBegin, traceEnd, traceEnd, traceEnd, traceThrow |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
login
private java.lang.String login
- the only netId that the handler will accept
password
private java.lang.String password
- the associated password
ExampleHandler
public ExampleHandler(org.dom4j.Element handlerElement,
java.lang.Boolean configDebug)
throws java.lang.Exception
- Analyse the XML configuration to set netId and password attributes (constructor).
- Parameters:
handlerElement - the XML element that declares the handler in the configuration fileconfigDebug - debugging mode of the global configuration (set by default to the handler)
- Throws:
java.lang.Exception - when the handler not configured correctly
authenticate
public int authenticate(java.lang.String userLogin,
java.lang.String userPassword)
- Try to authenticate a user (compare with the local credentials).
- Specified by:
authenticate in class BasicHandler
- Parameters:
userLogin - the user's loginuserPassword - the user's password
- Returns:
- BasicHandler.SUCCEDED on success,
BasicHandler.FAILED_CONTINUE or BasicHandler.FAILED_STOP otherwise.