public abstract class SASLMechanism
extends java.lang.Object
getName() -- returns the common name of the SASL mechanism.getAuthenticationText(String, String, String) -- authentication text to include
in the initial auth stanza.getChallengeResponse(byte[]) -- to respond challenges made by the server.| Constructor and Description |
|---|
SASLMechanism(SASLAuthentication saslAuthentication) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(java.lang.String username,
java.lang.String host,
java.lang.String password)
Builds and sends the auth stanza to the server.
|
void |
challengeReceived(java.lang.String challenge)
The server is challenging the SASL mechanism for the stanza he just sent.
|
protected abstract java.lang.String |
getAuthenticationText(java.lang.String username,
java.lang.String host,
java.lang.String password)
Returns the authentication text to include in the initial auth stanza
or null if nothing should be added.
|
protected abstract java.lang.String |
getChallengeResponse(byte[] bytes)
Returns the response text to send answering the challenge sent by the server.
|
protected abstract java.lang.String |
getName()
Returns the common name of the SASL mechanism.
|
protected SASLAuthentication |
getSASLAuthentication() |
public SASLMechanism(SASLAuthentication saslAuthentication)
public void authenticate(java.lang.String username,
java.lang.String host,
java.lang.String password)
throws java.io.IOException
username - the username of the user being authenticated.host - the hostname where the user account resides.password - the password of the user.java.io.IOException - If a network error occures while authenticating.public void challengeReceived(java.lang.String challenge)
throws java.io.IOException
challenge - a base64 encoded string representing the challenge.java.io.IOExceptionprotected abstract java.lang.String getChallengeResponse(byte[] bytes)
bytes - the challenge sent by the server.protected abstract java.lang.String getName()
protected abstract java.lang.String getAuthenticationText(java.lang.String username,
java.lang.String host,
java.lang.String password)
username - the username of the user being authenticated.host - the hostname where the user account resides.password - the password of the user.protected SASLAuthentication getSASLAuthentication()
Copyright © 2003 Jive Software.