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

## Class XOAuth2Mechanism

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.AbstractSaslMechanism
  - - tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.XOAuth2Mechanism

- All Implemented Interfaces:
    SaslMechanism

      public class XOAuth2Mechanism
      extends AbstractSaslMechanism

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `X_OAUTH2_TOKEN_CALLBACK_KEY`
    `static String` | `X_OAUTH2_TOKEN_KEY`

    - ### Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.AbstractSaslMechanism

      `SASL_COMPLETE_KEY`

    - ### Fields inherited from interface tigase.jaxmpp.core.client.xmpp.modules.auth.SaslMechanism

      `FORCE_AUTHZID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XOAuth2Mechanism()`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `String` | `name()` Return mechanism name.

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.AbstractSaslMechanism

      `isComplete, setComplete`

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

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

- - ### Field Detail

    - #### X_OAUTH2_TOKEN_CALLBACK_KEY

          public static final String X_OAUTH2_TOKEN_CALLBACK_KEY

      See Also:
        Constant Field Values

    - #### X_OAUTH2_TOKEN_KEY

          public static final String X_OAUTH2_TOKEN_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XOAuth2Mechanism

          public XOAuth2Mechanism()

  - ### Method Detail

    - #### evaluateChallenge

          public String evaluateChallenge(String input,
                                          SessionObject sessionObject)
                                   throws ClientSaslException

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

    - #### isAllowedToUse

          public boolean isAllowedToUse(SessionObject sessionObject)

      Description copied from interface: `SaslMechanism`
      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.

    - #### name

          public String name()

      Description copied from interface: `SaslMechanism`
      Return mechanism name.
      Returns:
        mechanism name.

Copyright © 2006–2019 Tigase. All rights reserved.