public class SASLGSSAPIMechanism extends SASLMechanism
SASLMechanism.AuthMechanism, SASLMechanism.Challenge, SASLMechanism.Response, SASLMechanism.SASLFailure, SASLMechanism.Success
authenticationId, hostname, password, sc
Constructor and Description |
---|
SASLGSSAPIMechanism(SASLAuthentication saslAuthentication) |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String username,
String host,
CallbackHandler cbh)
Builds and sends the auth stanza to the server.
|
void |
authenticate(String username,
String host,
String password)
Builds and sends the auth stanza to the server.
|
protected String |
getName()
Returns the common name of the SASL mechanism.
|
authenticate, authenticate, authenticate, challengeReceived, getSASLAuthentication, handle
public SASLGSSAPIMechanism(SASLAuthentication saslAuthentication)
protected String getName()
SASLMechanism
getName
in class SASLMechanism
public void authenticate(String username, String host, CallbackHandler cbh) throws IOException, SaslException, SmackException.NotConnectedException
username
- the username of the user being authenticated.host
- the hostname where the user account resides.cbh
- the CallbackHandler (not used with GSSAPI)IOException
- If a network error occures while authenticating.SmackException.NotConnectedException
SaslException
public void authenticate(String username, String host, String password) throws IOException, SaslException, SmackException.NotConnectedException
username
- the username of the user being authenticated.host
- the hostname where the user account resides.password
- the password of the user (ignored for GSSAPI)IOException
- If a network error occures while authenticating.SmackException.NotConnectedException
SaslException