1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 00:02:06 +01:00

Remove SASLAuthentication.init()

This commit is contained in:
Florian Schmaus 2019-09-23 20:00:16 +02:00
parent bf538129c2
commit 93aaf6d8d7
2 changed files with 2 additions and 11 deletions

View file

@ -500,7 +500,6 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
// Reset the connection state // Reset the connection state
initState(); initState();
saslAuthentication.init();
streamId = null; streamId = null;
try { try {

View file

@ -168,7 +168,6 @@ public final class SASLAuthentication {
SASLAuthentication(AbstractXMPPConnection connection, ConnectionConfiguration configuration) { SASLAuthentication(AbstractXMPPConnection connection, ConnectionConfiguration configuration) {
this.configuration = configuration; this.configuration = configuration;
this.connection = connection; this.connection = connection;
this.init();
} }
/** /**
@ -200,6 +199,8 @@ public final class SASLAuthentication {
final String host = connection.getHost(); final String host = connection.getHost();
final DomainBareJid xmppServiceDomain = connection.getXMPPServiceDomain(); final DomainBareJid xmppServiceDomain = connection.getXMPPServiceDomain();
authenticationSuccessful = false;
synchronized (this) { synchronized (this) {
if (callbackHandler != null) { if (callbackHandler != null) {
currentMechanism.authenticate(host, xmppServiceDomain, callbackHandler, authzid, sslSession); currentMechanism.authenticate(host, xmppServiceDomain, callbackHandler, authzid, sslSession);
@ -322,15 +323,6 @@ public final class SASLAuthentication {
return authenticationSuccessful; return authenticationSuccessful;
} }
/**
* Initializes the internal state in order to be able to be reused. The authentication
* is used by the connection at the first login and then reused after the connection
* is disconnected and then reconnected.
*/
void init() {
authenticationSuccessful = false;
}
String getNameOfLastUsedSaslMechansism() { String getNameOfLastUsedSaslMechansism() {
SASLMechanism lastUsedMech = currentMechanism; SASLMechanism lastUsedMech = currentMechanism;
if (lastUsedMech == null) { if (lastUsedMech == null) {