com.ericdaugherty.mail.server.auth
Class PlainServerMode
java.lang.Object
com.ericdaugherty.mail.server.auth.PlainServerMode
- All Implemented Interfaces:
- AuthServerMode, javax.security.sasl.SaslServer
- Direct Known Subclasses:
- LoginServerMode
public class PlainServerMode
- extends java.lang.Object
- implements AuthServerMode, javax.security.sasl.SaslServer
Verify client authentication using SASL PLAIN.
- Author:
- Andreas Kyrmegalos
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clientIp
protected java.lang.String clientIp
- The IP address of the client
finalizeAuthentication
protected final PlainServerMode.FinalizeAuthentication finalizeAuthentication
user
protected User user
domainNeeded
protected boolean domainNeeded
userMBLocked
protected boolean userMBLocked
PlainServerMode
public PlainServerMode(boolean isSMTP)
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()
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 start,
int len)
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 start,
int len)
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