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

## Class ScramPlusMechanism

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.AbstractSaslMechanism
  - - tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram
    - - tigase.jaxmpp.core.client.xmpp.modules.auth.scram.ScramPlusMechanism

- All Implemented Interfaces:
    SaslMechanism
  Direct Known Subclasses:
    ScramSHA256PlusMechanism, ScramSHA512PlusMechanism

      public class ScramPlusMechanism
      extends AbstractScram

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram

      `AbstractScram.BindType`

  - ### Field Summary

    - ### Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram

      `UTF_CHARSET`

    - ### 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
    Modifier | Constructor and Description
    --- | ---
    `` | `ScramPlusMechanism()`
    `protected` | `ScramPlusMechanism(String mechanismName, String algorithm, byte[] clientKey, byte[] serverKey)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `getBindData(AbstractScram.BindType bindType, SessionObject sessionObject)`
    `protected AbstractScram.BindType` | `getBindType(SessionObject sessionObject)`
    `protected List<AbstractScram.BindType>` | `getServerBindTypes(SessionObject sessionObject)`
    `boolean` | `isAllowedToUse(SessionObject sessionObject)` This method is used to check if mechanism can be used with current session.

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram

      `evaluateChallenge, getData, h, hi, hmac, key, name, normalize, randomString, xor`

    - ### 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`

- - ### Constructor Detail

    - #### ScramPlusMechanism

          public ScramPlusMechanism()

    - #### ScramPlusMechanism

          protected ScramPlusMechanism(String mechanismName,
                                       String algorithm,
                                       byte[] clientKey,
                                       byte[] serverKey)

  - ### Method Detail

    - #### getBindData

          protected byte[] getBindData(AbstractScram.BindType bindType,
                                       SessionObject sessionObject)

      Specified by:
        `getBindData` in class `AbstractScram`

    - #### getBindType

          protected AbstractScram.BindType getBindType(SessionObject sessionObject)

      Specified by:
        `getBindType` in class `AbstractScram`

    - #### getServerBindTypes

          protected List<AbstractScram.BindType> getServerBindTypes(SessionObject sessionObject)

    - #### 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.
      Specified by:
        `isAllowedToUse` in interface `SaslMechanism`
      Overrides:
        `isAllowedToUse` in class `AbstractScram`
      Parameters:
        `sessionObject` - current SessionObject
      Returns:
        `true` if mechanism can be used it current XMPP session.

Copyright © 2006–2023 Tigase. All rights reserved.