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

## Interface SaslMechanism

- All Known Implementing Classes:
    AbstractSaslMechanism, AnonymousMechanism, ExternalMechanism, PlainMechanism, ScramMechanism, XOAuth2Mechanism

      public interface SaslMechanism

  Interface for implementing SASL mechanisms.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `evaluateChallenge(String input, SessionObject sessionObject)` Evaluating challenge received from server.
    `boolean` | `isAllowedToUse(SessionObject sessionObject)` This method is used to check if mechanism can be used with current session.
    `boolean` | `isComplete(SessionObject sessionObject)` Determines whether the authentication exchange has completed.
    `String` | `name()` Return mechanism name.

- - ### Method Detail

    - #### evaluateChallenge

          String evaluateChallenge(String input,
                                   SessionObject sessionObject)
                            throws ClientSaslException

      Evaluating challenge received from server.
      Parameters:
        `input` - received data
        `sessionObject` - current SessionObject
      Returns:
        calculated response
      Throws:
        `ClientSaslException`

    - #### isAllowedToUse

          boolean isAllowedToUse(SessionObject sessionObject)

      This method is used to check if mechanism can be used with current session. For example if no username and passowrd is stored in sessionObject, then PlainMechanism can't be used.
      Parameters:
        `sessionObject` - current SessionObject
      Returns:
        `true` if mechanism can be used it current XMPP session.

    - #### isComplete

          boolean isComplete(SessionObject sessionObject)

      Determines whether the authentication exchange has completed.
      Parameters:
        `sessionObject` - current SessionObject
      Returns:
        `true` if exchange is complete.

    - #### name

          String name()

      Return mechanism name.
      Returns:
        mechanism name.

Copyright © 2006–2016 Tigase. All rights reserved.