public class AnonymousLoginStrategy extends java.lang.Object implements JabberLoginStrategy
JabberAccountID.ANONYMOUS_AUTH
Constructor and Description |
---|
AnonymousLoginStrategy(java.lang.String login)
Creates new anonymous login strategy instance.
|
Modifier and Type | Method and Description |
---|---|
javax.net.ssl.SSLContext |
createSslContext(CertificateService certificateService,
javax.net.ssl.X509ExtendedTrustManager trustManager)
Creates an SSLContext to use for the login strategy.
|
boolean |
isTlsRequired()
Is TLS required for this login strategy / account?
|
boolean |
login(org.jivesoftware.smack.Connection connection,
java.lang.String userName,
java.lang.String resource)
Performs the login for the specified connection.
|
boolean |
loginPreparationSuccessful()
Determines whether the login preparation was successful and the strategy
is ready to start connecting.
|
UserCredentials |
prepareLogin(SecurityAuthority authority,
int reasonCode)
Prepare the login by e.g.
|
public AnonymousLoginStrategy(java.lang.String login)
login
- user login only for the purpose of returning
UserCredentials that are used by accompanying
services.public UserCredentials prepareLogin(SecurityAuthority authority, int reasonCode)
JabberLoginStrategy
prepareLogin
in interface JabberLoginStrategy
authority
- SecurityAuthority to obtain the passwordreasonCode
- reason why we're preparing for loginSecurityAuthority
public boolean loginPreparationSuccessful()
JabberLoginStrategy
loginPreparationSuccessful
in interface JabberLoginStrategy
public boolean login(org.jivesoftware.smack.Connection connection, java.lang.String userName, java.lang.String resource) throws org.jivesoftware.smack.XMPPException
JabberLoginStrategy
login
in interface JabberLoginStrategy
connection
- Connection to loginuserName
- userName to be used for the login.resource
- the XMPP resourceorg.jivesoftware.smack.XMPPException
public boolean isTlsRequired()
JabberLoginStrategy
isTlsRequired
in interface JabberLoginStrategy
public javax.net.ssl.SSLContext createSslContext(CertificateService certificateService, javax.net.ssl.X509ExtendedTrustManager trustManager) throws java.security.GeneralSecurityException
JabberLoginStrategy
createSslContext
in interface JabberLoginStrategy
certificateService
- certificate service to retrieve the
ssl contexttrustManager
- Trust manager to use for the contextjava.security.GeneralSecurityException
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.