org.esupportail.cas.server.handlers.nt
Class NtServer

java.lang.Object
  extended by org.esupportail.cas.server.util.log.Debug
      extended by org.esupportail.cas.server.util.Server
          extended by org.esupportail.cas.server.handlers.nt.NtServer

public final class NtServer
extends Server

This class implements a NIS (Network Information Service) server.

Author:
Pascal Aubry

Field Summary
private  java.lang.String host
          The server hostname or IP address.
 
Fields inherited from class org.esupportail.cas.server.util.Server
AUTHENTICATE_FAILURE, AUTHENTICATE_NOAUTH, AUTHENTICATE_SUCCESS, CONNECT_FAILURE, CONNECT_NOAUTH, CONNECT_SUCCESS
 
Constructor Summary
NtServer(java.lang.Boolean handlerDebug, RedundantHandler handler, org.dom4j.Element serverElement)
          Constructor.
 
Method Summary
 int authenticate(java.lang.String username, java.lang.String password)
          Try to authenticate a user (by searching into a NT domain).
 
Methods inherited from class org.esupportail.cas.server.util.Server
getConnectError, getHandler, getServerSubElementContent, setConnectError
 
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
 

Field Detail

host

private java.lang.String host
The server hostname or IP address.

Constructor Detail

NtServer

public NtServer(java.lang.Boolean handlerDebug,
                RedundantHandler handler,
                org.dom4j.Element serverElement)
         throws java.lang.Exception
Constructor.

Parameters:
handlerDebug - debugging mode of the handler
handler - the handler the server will be used by
serverElement - the XML element that declares the server
Throws:
java.lang.Exception - Exception
Method Detail

authenticate

public int authenticate(java.lang.String username,
                        java.lang.String password)
Try to authenticate a user (by searching into a NT domain).

Specified by:
authenticate in class Server
Parameters:
username - the user's name
password - the user's password
Returns:
Server.AUTHENTICATE_SUCCESS, Server.AUTHENTICATE_NOAUTH or Server.AUTHENTICATE_FAILURE.