Package tigase.auth.impl
Class PlainCallbackHandler
- java.lang.Object
-
- tigase.auth.impl.PlainCallbackHandler
-
- All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler,AuthRepositoryAware,Aware,DomainAware,SessionAware
public class PlainCallbackHandler extends java.lang.Object implements javax.security.auth.callback.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(javax.security.auth.callback.Callback[] callbacks)protected voidhandleAuthorizeCallback(javax.security.sasl.AuthorizeCallback authCallback)protected voidhandleCallback(javax.security.auth.callback.Callback callback)protected voidhandleNameCallback(javax.security.auth.callback.NameCallback nc)protected voidhandleRealmCallback(javax.security.sasl.RealmCallback rc)protected voidhandleVerifyPasswordCallback(VerifyPasswordCallback pc)voidsetAuthRepository(AuthRepository repo)Sets AuthRepository.voidsetDomain(java.lang.String domain)Sets name of domain from XMPP Stream.voidsetSession(XMPPResourceConnection session)Sets XMPP Session.
-
-
-
Field Detail
-
domain
protected java.lang.String domain
-
jid
protected BareJID jid
-
log
protected java.util.logging.Logger log
-
repo
protected AuthRepository repo
-
-
Method Detail
-
handle
public void handle(javax.security.auth.callback.Callback[] callbacks) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackException- Specified by:
handlein interfacejavax.security.auth.callback.CallbackHandler- Throws:
java.io.IOExceptionjavax.security.auth.callback.UnsupportedCallbackException
-
setAuthRepository
public void setAuthRepository(AuthRepository repo)
Description copied from interface:AuthRepositoryAwareSets AuthRepository.- Specified by:
setAuthRepositoryin interfaceAuthRepositoryAware- Parameters:
repo- AuthRepository.
-
setDomain
public void setDomain(java.lang.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(javax.security.sasl.AuthorizeCallback authCallback)
-
handleCallback
protected void handleCallback(javax.security.auth.callback.Callback callback) throws javax.security.auth.callback.UnsupportedCallbackException, java.io.IOException- Throws:
javax.security.auth.callback.UnsupportedCallbackExceptionjava.io.IOException
-
handleNameCallback
protected void handleNameCallback(javax.security.auth.callback.NameCallback nc) throws java.io.IOException- Throws:
java.io.IOException
-
handleRealmCallback
protected void handleRealmCallback(javax.security.sasl.RealmCallback rc) throws java.io.IOException- Throws:
java.io.IOException
-
handleVerifyPasswordCallback
protected void handleVerifyPasswordCallback(VerifyPasswordCallback pc) throws java.io.IOException
- Throws:
java.io.IOException
-
-