Package tigase.auth.impl
Class PlainCallbackHandler
- java.lang.Object
-
- tigase.auth.impl.PlainCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler,AuthRepositoryAware,Aware,DomainAware,SessionAware
public class PlainCallbackHandler extends Object implements CallbackHandler, AuthRepositoryAware, DomainAware, SessionAware
Implementation of CallbackHandler for authentication with SASL PLAIN or using plaintext password.
-
-
Constructor Summary
Constructors Constructor Description PlainCallbackHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(Callback[] callbacks)protected voidhandleAuthorizeCallback(AuthorizeCallback authCallback)protected voidhandleCallback(Callback callback)protected voidhandleNameCallback(NameCallback nc)protected voidhandleRealmCallback(RealmCallback rc)protected voidhandleVerifyPasswordCallback(VerifyPasswordCallback pc)voidsetAuthRepository(AuthRepository repo)Sets AuthRepository.voidsetDomain(String domain)Sets name of domain from XMPP Stream.voidsetSession(XMPPResourceConnection session)Sets XMPP Session.
-
-
-
Field Detail
-
domain
protected String domain
-
jid
protected BareJID jid
-
log
protected Logger log
-
repo
protected AuthRepository repo
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
handlein interfaceCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-
setAuthRepository
public void setAuthRepository(AuthRepository repo)
Description copied from interface:AuthRepositoryAwareSets AuthRepository.- Specified by:
setAuthRepositoryin interfaceAuthRepositoryAware- Parameters:
repo- AuthRepository.
-
setDomain
public void setDomain(String domain)
Description copied from interface:DomainAwareSets name of domain from XMPP Stream.- Specified by:
setDomainin interfaceDomainAware- Parameters:
domain- domain name
-
setSession
public void setSession(XMPPResourceConnection session)
Description copied from interface:SessionAwareSets XMPP Session.- Specified by:
setSessionin interfaceSessionAware- Parameters:
session- XMPP session.
-
handleAuthorizeCallback
protected void handleAuthorizeCallback(AuthorizeCallback authCallback)
-
handleCallback
protected void handleCallback(Callback callback) throws UnsupportedCallbackException, IOException
-
handleNameCallback
protected void handleNameCallback(NameCallback nc) throws IOException
- Throws:
IOException
-
handleRealmCallback
protected void handleRealmCallback(RealmCallback rc) throws IOException
- Throws:
IOException
-
handleVerifyPasswordCallback
protected void handleVerifyPasswordCallback(VerifyPasswordCallback pc) throws IOException
- Throws:
IOException
-
-