Package tigase.xmpp.impl

# Class SaslAuthAbstract

java.lang.Object
tigase.xmpp.XMPPProcessor
tigase.xmpp.impl.AbstractAuthPreprocessor
tigase.xmpp.impl.SaslAuthAbstract

All Implemented Interfaces:
  `Comparable<XMPPImplIfc>`, `XMPPImplIfc`, `XMPPPreprocessorIfc`, `XMPPProcessorConcurrencyAwareIfc`, `XMPPProcessorIfc`

Direct Known Subclasses:
  `SaslAuth`, `SaslAuth2`

public abstract class SaslAuthAbstract extends AbstractAuthPreprocessor implements XMPPProcessorIfc

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `ALLOWED_SASL_MECHANISMS_KEY`
  `protected final Map<String,Object>`
  `props`
  `protected static final String`
  `SASL_SERVER_KEY`
  `protected TigaseSaslProvider`
  `saslProvider`

  ### Fields inherited from class tigase.xmpp.XMPPProcessor

  `ALL_NAMES, ALL_PATHS, cmpInfo`

  ### Fields inherited from interface tigase.xmpp.XMPPImplIfc

  `CLIENT_XMLNS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SaslAuthAbstract()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `concurrentQueuesNo()`
  Methods returns a preferable number of threads/packets queues for the plugin.
  `protected Packet`
  `createSaslErrorResponse(XmppSaslException.SaslError error, String message, Packet packet)`
  `protected BareJID`
  `extractUserJid(Exception e, XMPPResourceConnection session)`
  Tries to extract BareJID of user who try to log in.
  `protected abstract String`
  `getXmlns()`
  `protected void`
  `onAuthFail(XMPPResourceConnection session)`
  `protected void`
  `processSessionAlreadyAuthorized(Packet packet, XMPPResourceConnection session, Queue<Packet> results)`
  `protected abstract void`
  `processSuccess(Packet packet, XMPPResourceConnection session, String challengeData, Queue<Packet> results)`

  ### Methods inherited from class tigase.xmpp.impl.AbstractAuthPreprocessor

  `addInvalidLogin, disableUser, getAllowMatchers, isBruteForceLockerEnabled, isLoginAllowedByBruteForceLocker, isPacketAllowed, preProcess, saveIntoBruteForceLocker, setAllowMatchers, setBruteForceLocker`

  ### Methods inherited from class tigase.xmpp.XMPPProcessor

  `canHandle, compareTo, getComponentInfo, getInstance, getQueueSize, getStatistics, getThreadsNo, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface java.lang.Comparable

  `compareTo`

  ### Methods inherited from interface tigase.xmpp.XMPPImplIfc

  `canHandle, getComponentInfo, getStatistics, id, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes`

  ### Methods inherited from interface tigase.xmpp.XMPPProcessorIfc

  `process`

- ## Field Details

  - ### SASL_SERVER_KEY

    protected static final String SASL_SERVER_KEY
    See Also:
      - Constant Field Values

  - ### ALLOWED_SASL_MECHANISMS_KEY

    protected static final String ALLOWED_SASL_MECHANISMS_KEY
    See Also:
      - Constant Field Values

  - ### props

    protected final Map<String,Object> props

  - ### saslProvider

    @Inject protected TigaseSaslProvider saslProvider

- ## Constructor Details

  - ### SaslAuthAbstract

    public SaslAuthAbstract()

- ## Method Details

  - ### concurrentQueuesNo

    public int concurrentQueuesNo()
    Description copied from interface: `XMPPImplIfc`
    Methods returns a preferable number of threads/packets queues for the plugin. This number can be overwritten through configuration settings, however, a default value should be reasonably good for most standard installations. It is recommended to assign at least as much as twice a number of CPUs cores for I/O bound processing and number a number equal to CPUs cores for fast processing not slowed down by any I/O.
    Specified by:
      `concurrentQueuesNo` in interface `XMPPImplIfc`
    Overrides:
      `concurrentQueuesNo` in class `XMPPProcessor`
    Returns:
      an integer preferred number of processing threads for the plugin.

  - ### createSaslErrorResponse

    protected Packet createSaslErrorResponse(XmppSaslException.SaslError error, String message, Packet packet)

  - ### extractUserJid

    protected BareJID extractUserJid(Exception e, XMPPResourceConnection session)
    Tries to extract BareJID of user who try to log in.
    Overrides:
      `extractUserJid` in class `AbstractAuthPreprocessor`

  - ### getXmlns

    protected abstract String getXmlns()

  - ### onAuthFail

    protected void onAuthFail(XMPPResourceConnection session)

  - ### processSessionAlreadyAuthorized

    protected void processSessionAlreadyAuthorized(Packet packet, XMPPResourceConnection session, Queue<Packet> results)

  - ### processSuccess

    protected abstract void processSuccess(Packet packet, XMPPResourceConnection session, String challengeData, Queue<Packet> results)