|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.javamail.authentication.DigestMD5Authenticator
public class DigestMD5Authenticator
Process a DIGEST-MD5 authentication, using the challenge/response mechanisms.
Nested Class Summary | |
---|---|
class |
DigestMD5Authenticator.NameValuePair
Simple inner class to represent a name/value pair. |
Field Summary | |
---|---|
protected static int |
AUTHENTICATE_CLIENT
|
protected static int |
AUTHENTICATE_SERVER
|
protected static int |
AUTHENTICATION_COMPLETE
|
protected String |
authenticationResponse
|
protected String |
clientResponse
|
protected String |
host
|
protected String |
nonce
|
protected String |
password
|
protected String |
realm
|
protected ArrayList |
realms
|
protected int |
stage
|
protected String |
username
|
Constructor Summary | |
---|---|
DigestMD5Authenticator(String host,
String username,
String password,
String realm)
Main constructor. |
Method Summary | |
---|---|
byte[] |
authenticateClient(byte[] challenge)
Evaluate a DIGEST-MD5 login client authentication challenge, returning the a result string that should satisfy the clallenge. |
byte[] |
authenticateServer(byte[] challenge)
Evaluate a DIGEST-MD5 login server authentication challenge, returning the a result string that should satisfy the clallenge. |
byte[] |
evaluateChallenge(byte[] challenge)
Evaluate a DIGEST-MD5 login challenge, returning the a result string that should satisfy the clallenge. |
String |
getMechanismName()
Retrieve the authenticator mechanism name. |
boolean |
hasInitialResponse()
Respond to the hasInitialResponse query. |
boolean |
isComplete()
Indicate whether the challenge/response process is complete. |
protected boolean |
parseChallenge(byte[] challenge)
Parse the challege string, pulling out information required for our challenge response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int AUTHENTICATE_CLIENT
protected static final int AUTHENTICATE_SERVER
protected static final int AUTHENTICATION_COMPLETE
protected String host
protected String username
protected String password
protected String realm
protected String clientResponse
protected String authenticationResponse
protected ArrayList realms
protected String nonce
protected int stage
Constructor Detail |
---|
public DigestMD5Authenticator(String host, String username, String password, String realm)
host
- The server host name.username
- The login user name.password
- The login password.realm
- The target login realm (can be null).Method Detail |
---|
public boolean hasInitialResponse()
hasInitialResponse
in interface ClientAuthenticator
public boolean isComplete()
isComplete
in interface ClientAuthenticator
public String getMechanismName()
getMechanismName
in interface ClientAuthenticator
public byte[] evaluateChallenge(byte[] challenge) throws MessagingException
evaluateChallenge
in interface ClientAuthenticator
challenge
- The decoded challenge data, as a string.
MessagingException
public byte[] authenticateServer(byte[] challenge) throws MessagingException
challenge
- The decoded challenge data, as a string.
MessagingException
public byte[] authenticateClient(byte[] challenge) throws MessagingException
challenge
- The decoded challenge data, as a string.
MessagingException
protected boolean parseChallenge(byte[] challenge) throws MessagingException
challenge
- The challenge data.
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |