com.ericdaugherty.mail.server.auth
Class DigestMd5ServerMode

java.lang.Object
  extended by com.ericdaugherty.mail.server.auth.DigestMd5ServerMode
All Implemented Interfaces:
AuthServerMode, javax.security.sasl.SaslServer

public class DigestMd5ServerMode
extends java.lang.Object
implements AuthServerMode, javax.security.sasl.SaslServer

Verify client authentication using SASL DIGEST-MD5. Possibly protect the data stream using integrity/privacy wrapping.

Author:
Andreas Kyrmegalos

Constructor Summary
DigestMd5ServerMode(boolean isSMTPSession)
           
 
Method Summary
 void conclude()
           
 void dispose()
           
 byte[] evaluateResponse(byte[] responseBytes)
           
 java.lang.String getAuthorizationID()
           
 java.lang.String getMechanismName()
           
 java.lang.Object getNegotiatedProperty(java.lang.String propName)
           
 User getUser()
           
 boolean isComplete()
           
 boolean isDomainNeeded()
           
 boolean isProtected()
           
 boolean isUserMBLocked()
           
 void setClientIp(java.lang.String clientIp)
           
 byte[] unwrap(byte[] incoming, int offset, int length)
           
 byte[] wrap(byte[] outgoing, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigestMd5ServerMode

public DigestMd5ServerMode(boolean isSMTPSession)
Method Detail

setClientIp

public void setClientIp(java.lang.String clientIp)

evaluateResponse

public byte[] evaluateResponse(byte[] responseBytes)
                        throws javax.security.sasl.SaslException
Specified by:
evaluateResponse in interface javax.security.sasl.SaslServer
Throws:
javax.security.sasl.SaslException

isDomainNeeded

public boolean isDomainNeeded()

isUserMBLocked

public boolean isUserMBLocked()

isProtected

public boolean isProtected()

getUser

public User getUser()
Specified by:
getUser in interface AuthServerMode

conclude

public void conclude()
Specified by:
conclude in interface AuthServerMode

getMechanismName

public java.lang.String getMechanismName()
Specified by:
getMechanismName in interface javax.security.sasl.SaslServer

unwrap

public byte[] unwrap(byte[] incoming,
                     int offset,
                     int length)
              throws javax.security.sasl.SaslException
Specified by:
unwrap in interface javax.security.sasl.SaslServer
Throws:
javax.security.sasl.SaslException

wrap

public byte[] wrap(byte[] outgoing,
                   int offset,
                   int length)
            throws javax.security.sasl.SaslException
Specified by:
wrap in interface javax.security.sasl.SaslServer
Throws:
javax.security.sasl.SaslException

dispose

public void dispose()
             throws javax.security.sasl.SaslException
Specified by:
dispose in interface javax.security.sasl.SaslServer
Throws:
javax.security.sasl.SaslException

getNegotiatedProperty

public java.lang.Object getNegotiatedProperty(java.lang.String propName)
Specified by:
getNegotiatedProperty in interface javax.security.sasl.SaslServer

getAuthorizationID

public java.lang.String getAuthorizationID()
Specified by:
getAuthorizationID in interface javax.security.sasl.SaslServer

isComplete

public boolean isComplete()
Specified by:
isComplete in interface javax.security.sasl.SaslServer