tigase.jaxmpp.core.client.xmpp.modules.auth

## Class SaslModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.auth.SaslModule

- All Implemented Interfaces:
    ContextAware, XmppModule

      public class SaslModule
      extends Object
      implements XmppModule, ContextAware

  Module for SASL authentication.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `SaslModule.SaslAuthFailedHandler`
    `static interface` | `SaslModule.SaslAuthStartHandler`
    `static interface` | `SaslModule.SaslAuthSuccessHandler`
    `static class` | `SaslModule.SaslError`
    `static class` | `SaslModule.UnsupportedSaslMechanisms`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Logger` | `log`
    `static String` | `SASL_MECHANISM`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SaslModule()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMechanism(SaslMechanism mechanism)`
    `void` | `addMechanism(SaslMechanism mechanism, boolean atFirstPlace)`
    `static List<String>` | `getAllowedSASLMechanisms(SessionObject sessionObject)`
    `Criteria` | `getCriteria()` Criteria
    `String[]` | `getFeatures()` Returns features what are implemented by Module.
    `ArrayList<String>` | `getMechanismsOrder()`
    `protected Collection<String>` | `getSupportedMechanisms()`
    `protected SaslMechanism` | `guessSaslMechanism()`
    `void` | `login()`
    `void` | `process(Element element)` Main method of module.
    `protected void` | `processChallenge(Element element)`
    `protected void` | `processFailure(Element element)`
    `protected void` | `processSuccess(Element element)`
    `void` | `setContext(Context context)`

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

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

- - ### Field Detail

    - #### SASL_MECHANISM

          public static final String SASL_MECHANISM

      See Also:
        Constant Field Values

    - #### log

          protected final Logger log

  - ### Constructor Detail

    - #### SaslModule

          public SaslModule()

  - ### Method Detail

    - #### getAllowedSASLMechanisms

          public static List<String> getAllowedSASLMechanisms(SessionObject sessionObject)
                                                       throws XMLException

      Throws:
        `XMLException`

    - #### addMechanism

          public void addMechanism(SaslMechanism mechanism)

    - #### addMechanism

          public void addMechanism(SaslMechanism mechanism,
                                   boolean atFirstPlace)

    - #### getCriteria

          public Criteria getCriteria()

      Description copied from interface: `XmppModule`
      Criteria
      Specified by:
        `getCriteria` in interface `XmppModule`
      Returns:

    - #### getFeatures

          public String[] getFeatures()

      Description copied from interface: `XmppModule`

      Returns features what are implemented by Module.

      See Service Discovery Features

      Specified by:
        `getFeatures` in interface `XmppModule`
      Returns:
        array of features

    - #### getMechanismsOrder

          public ArrayList<String> getMechanismsOrder()

    - #### getSupportedMechanisms

          protected Collection<String> getSupportedMechanisms()
                                                       throws XMLException

      Throws:
        `XMLException`

    - #### guessSaslMechanism

          protected SaslMechanism guessSaslMechanism()
                                              throws XMLException

      Throws:
        `XMLException`

    - #### login

          public void login()
                     throws XMLException,
                            JaxmppException

      Throws:
        `XMLException`
        `JaxmppException`

    - #### process

          public void process(Element element)
                       throws XMPPException,
                              XMLException,
                              JaxmppException

      Description copied from interface: `XmppModule`
      Main method of module. Module will process incoming stanza by call this method.
      Specified by:
        `process` in interface `XmppModule`
      Parameters:
        `element` - incoming XMPP stanza
      Throws:
        `XMPPException`
        `XMLException`
        `JaxmppException`

    - #### processChallenge

          protected void processChallenge(Element element)
                                   throws XMPPException,
                                          XMLException,
                                          JaxmppException

      Throws:
        `XMPPException`
        `XMLException`
        `JaxmppException`

    - #### processFailure

          protected void processFailure(Element element)
                                 throws JaxmppException

      Throws:
        `JaxmppException`

    - #### processSuccess

          protected void processSuccess(Element element)
                                 throws JaxmppException

      Throws:
        `JaxmppException`

    - #### setContext

          public void setContext(Context context)

      Specified by:
        `setContext` in interface `ContextAware`

Copyright © 2006–2017 Tigase. All rights reserved.