| java.lang.Object org.esupportail.cas.server.util.log.Debug org.esupportail.cas.server.util.BasicHandler
All known Subclasses: org.esupportail.cas.server.util.RedundantHandler, org.esupportail.cas.server.handlers.test.PasswordEqualsUsernameHandler, org.esupportail.cas.server.handlers.nis.NisHandler, org.esupportail.cas.server.handlers.test.EmptyPasswordHandler, org.esupportail.cas.server.handlers.file.FileHandler, org.esupportail.cas.server.handlers.example.ExampleHandler, org.esupportail.cas.server.handlers.reject.RejectHandler, org.esupportail.cas.server.handlers.database.LSDatabaseHandler,
BasicHandler | abstract public class BasicHandler extends Debug (Code) | | This class implements a basic handler, without any property.
This abstract class is inherited by any handler.
author: Pascal Aubry |
Field Summary | |
final protected static int | FAILED_CONTINUE The value return by authenticate() when the authentication
failed but the next handler should be tried. | final public static int | FAILED_STOP The value return by authenticate() when the authentication
failed and the authentication process should stop. | final public static int | SUCCEEDED The value return by authenticate() when the authentication
was successfull. |
Constructor Summary | |
protected | BasicHandler(Element handlerElement, Boolean configDebug) Constructor. |
Method Summary | |
abstract public int | authenticate(String username, String password) Tries to Authenticate a user by accessing all the servers.. | final protected void | checkConfigElement(boolean configElementNeeded) Check the "config" XML element if needed. | final protected Element | getConfigElement() Retrieve the XML element the represents the configuration of the handler
in the configuration file. | final protected String | getConfigSubElementContent(String elementName, boolean needed) Retrieve the content of a config sub-element. | final protected boolean | hasConfigSubElement(String elementName) Tell if a config sub-element is present. |
FAILED_CONTINUE | final protected static int FAILED_CONTINUE(Code) | | The value return by authenticate() when the authentication
failed but the next handler should be tried.
|
FAILED_STOP | final public static int FAILED_STOP(Code) | | The value return by authenticate() when the authentication
failed and the authentication process should stop.
|
SUCCEEDED | final public static int SUCCEEDED(Code) | | The value return by authenticate() when the authentication
was successfull.
|
BasicHandler | protected BasicHandler(Element handlerElement, Boolean configDebug)(Code) | | Constructor.
Parameters: handlerElement - the XML element that declares the handler in the configuration file Parameters: configDebug - debugging mode of the global configuration |
authenticate | abstract public int authenticate(String username, String password)(Code) | | Tries to Authenticate a user by accessing all the servers..
Parameters: username - the username to authenticate Parameters: password - the corresponding password SUCCEDED on success, FAILED_CONTINUE or FAILED_STOP otherwise. |
checkConfigElement | final protected void checkConfigElement(boolean configElementNeeded) throws Exception(Code) | | Check the "config" XML element if needed.
Parameters: configElementNeeded - true if a config element is needed throws: Exception - Exception |
getConfigElement | final protected Element getConfigElement()(Code) | | Retrieve the XML element the represents the configuration of the handler
in the configuration file.
an XML element. |
getConfigSubElementContent | final protected String getConfigSubElementContent(String elementName, boolean needed) throws Exception(Code) | | Retrieve the content of a config sub-element.
Parameters: elementName - the name of the XML element to look for Parameters: needed - false if the element can be absent or empty, true otherwise a String throws: Exception - Exception |
hasConfigSubElement | final protected boolean hasConfigSubElement(String elementName) throws Exception(Code) | | Tell if a config sub-element is present.
Parameters: elementName - the name of the XML element to look for true if the element is present, false otherwise throws: Exception - Exception |
|
|