Class ScramCredentialData

java.lang.Object
org.jivesoftware.openfire.auth.ScramCredentialData

public class ScramCredentialData extends Object
SCRAM credentials for a single user and a single mechanism. The mechanism is stored in its normalized ('base') form: upper-cased and without the optional -PLUS suffix (channel binding does not affect the stored credential material, only the SASL exchange). This type exists to give the credential storage a stable, mechanism-keyed shape. In the current release only SCRAM-SHA-1 is produced and consumed; the type is intentionally kept minimal.
  • Field Details

    • mechanism

      public final String mechanism
    • salt

      public final String salt
    • iterations

      public final int iterations
    • storedKey

      public final String storedKey
    • serverKey

      public final String serverKey
  • Constructor Details

    • ScramCredentialData

      public ScramCredentialData(String mechanism, String salt, int iterations, String storedKey, String serverKey)
  • Method Details

    • normalizeMechanismName

      public static String normalizeMechanismName(String mechanism)
      Normalizes a SCRAM mechanism name to upper case and strips the optional -PLUS suffix.
      Parameters:
      mechanism - The mechanism name (for example: SCRAM-SHA-1-PLUS).
      Returns:
      The normalized base mechanism name (for example: SCRAM-SHA-1).
      Throws:
      IllegalArgumentException - if the value is null, empty, or not a SCRAM mechanism name.