Package org.jivesoftware.openfire.auth
Class ScramCredentialData
java.lang.Object
org.jivesoftware.openfire.auth.ScramCredentialData
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScramCredentialData(String mechanism, String salt, int iterations, String storedKey, String serverKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringnormalizeMechanismName(String mechanism) Normalizes a SCRAM mechanism name to upper case and strips the optional-PLUSsuffix.
-
Field Details
-
mechanism
-
salt
-
iterations
public final int iterations -
storedKey
-
serverKey
-
-
Constructor Details
-
ScramCredentialData
-
-
Method Details
-
normalizeMechanismName
Normalizes a SCRAM mechanism name to upper case and strips the optional-PLUSsuffix.- 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.
-