org.jivesoftware.smack.sasl
Class SASLGSSAPIMechanism
java.lang.Object
org.jivesoftware.smack.sasl.SASLMechanism
org.jivesoftware.smack.sasl.SASLGSSAPIMechanism
- All Implemented Interfaces:
- javax.security.auth.callback.CallbackHandler
public class SASLGSSAPIMechanism
- extends SASLMechanism
Implementation of the SASL GSSAPI mechanism
- Author:
- Jay Kline
|
Method Summary |
void |
authenticate(java.lang.String username,
java.lang.String host,
javax.security.auth.callback.CallbackHandler cbh)
Builds and sends the auth stanza to the server. |
void |
authenticate(java.lang.String username,
java.lang.String host,
java.lang.String password)
Builds and sends the auth stanza to the server. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SASLGSSAPIMechanism
public SASLGSSAPIMechanism(SASLAuthentication saslAuthentication)
authenticate
public void authenticate(java.lang.String username,
java.lang.String host,
javax.security.auth.callback.CallbackHandler cbh)
throws java.io.IOException,
XMPPException
- Builds and sends the auth stanza to the server.
This overrides from the abstract class because the initial token
needed for GSSAPI is binary, and not safe to put in a string, thus
getAuthenticationText() cannot be used.
- Overrides:
authenticate in class SASLMechanism
- Parameters:
username - the username of the user being authenticated.host - the hostname where the user account resides.cbh - the CallbackHandler (not used with GSSAPI)
- Throws:
java.io.IOException - If a network error occures while authenticating.
XMPPException - If a protocol error occurs or the user is not authenticated.
authenticate
public void authenticate(java.lang.String username,
java.lang.String host,
java.lang.String password)
throws java.io.IOException,
XMPPException
- Builds and sends the auth stanza to the server.
This overrides from the abstract class because the initial token
needed for GSSAPI is binary, and not safe to put in a string, thus
getAuthenticationText() cannot be used.
- Overrides:
authenticate in class SASLMechanism
- Parameters:
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)
- Throws:
java.io.IOException - If a network error occures while authenticating.
XMPPException - If a protocol error occurs or the user is not authenticated.