mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-04 15:45:58 +01:00
Code cleanup in SASLMechanism
- typos - deprecated methods - whitespace fixes
This commit is contained in:
parent
57231648c8
commit
07649cc758
1 changed files with 7 additions and 27 deletions
|
@ -40,7 +40,7 @@ import javax.security.sasl.SaslException;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link #getName()} -- returns the common name of the SASL mechanism.</li>
|
* <li>{@link #getName()} -- returns the common name of the SASL mechanism.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* Subclasses will likely want to implement their own versions of these mthods:
|
* Subclasses will likely want to implement their own versions of these methods:
|
||||||
* <li>{@link #authenticate(String, String, String)} -- Initiate authentication stanza using the
|
* <li>{@link #authenticate(String, String, String)} -- Initiate authentication stanza using the
|
||||||
* deprecated method.</li>
|
* deprecated method.</li>
|
||||||
* <li>{@link #authenticate(String, String, CallbackHandler)} -- Initiate authentication stanza
|
* <li>{@link #authenticate(String, String, CallbackHandler)} -- Initiate authentication stanza
|
||||||
|
@ -69,8 +69,6 @@ import javax.security.sasl.SaslException;
|
||||||
* <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
|
* <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
|
||||||
* cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
|
* cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
|
||||||
* </challenge>
|
* </challenge>
|
||||||
*
|
|
||||||
|
|
||||||
*
|
*
|
||||||
* @author Jay Kline
|
* @author Jay Kline
|
||||||
*/
|
*/
|
||||||
|
@ -148,22 +146,6 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
authenticate();
|
authenticate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Same as {@link #authenticate(String, String, String, String)}, but with the hostname used as the serviceName.
|
|
||||||
* <p>
|
|
||||||
* Kept for backward compatibility only.
|
|
||||||
*
|
|
||||||
* @param username the username of the user being authenticated.
|
|
||||||
* @param host the hostname where the user account resides.
|
|
||||||
* @param password the password for this account.
|
|
||||||
* @throws IOException If a network error occurs while authenticating.
|
|
||||||
* @throws XMPPException If a protocol error occurs or the user is not authenticated.
|
|
||||||
* @deprecated Please use {@link #authenticate(String, String, String, String)} instead.
|
|
||||||
*/
|
|
||||||
public void authenticate(String username, String host, String password) throws IOException, XMPPException {
|
|
||||||
authenticate(username, host, host, password);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds and sends the <tt>auth</tt> stanza to the server. The callback handler will handle
|
* Builds and sends the <tt>auth</tt> stanza to the server. The callback handler will handle
|
||||||
* any additional information, such as the authentication ID or realm, if it is needed.
|
* any additional information, such as the authentication ID or realm, if it is needed.
|
||||||
|
@ -196,7 +178,6 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
getSASLAuthentication().send(new AuthMechanism(getName(), authenticationText));
|
getSASLAuthentication().send(new AuthMechanism(getName(), authenticationText));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The server is challenging the SASL mechanism for the stanza he just sent. Send a
|
* The server is challenging the SASL mechanism for the stanza he just sent. Send a
|
||||||
* response to the server's challenge.
|
* response to the server's challenge.
|
||||||
|
@ -231,7 +212,6 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
*/
|
*/
|
||||||
protected abstract String getName();
|
protected abstract String getName();
|
||||||
|
|
||||||
|
|
||||||
protected SASLAuthentication getSASLAuthentication() {
|
protected SASLAuthentication getSASLAuthentication() {
|
||||||
return saslAuthentication;
|
return saslAuthentication;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +248,7 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
/**
|
/**
|
||||||
* Initiating SASL authentication by select a mechanism.
|
* Initiating SASL authentication by select a mechanism.
|
||||||
*/
|
*/
|
||||||
public class AuthMechanism extends Packet {
|
public static class AuthMechanism extends Packet {
|
||||||
final private String name;
|
final private String name;
|
||||||
final private String authenticationText;
|
final private String authenticationText;
|
||||||
|
|
||||||
|
@ -318,7 +298,7 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
/**
|
/**
|
||||||
* A SASL response stanza.
|
* A SASL response stanza.
|
||||||
*/
|
*/
|
||||||
public class Response extends Packet {
|
public static class Response extends Packet {
|
||||||
final private String authenticationText;
|
final private String authenticationText;
|
||||||
|
|
||||||
public Response() {
|
public Response() {
|
||||||
|
|
Loading…
Reference in a new issue