Record Class CredentialVerificationResult.Verified
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.password.CredentialVerificationResult.Verified
- Record Components:
originalEncodedHash- the encoded envelope that was just verified; required as the compare-and-swap witness for any rehashcredentialType- credential discriminatoralgorithm- algorithm of the verified envelopeproviderId- provider identifier of the verified envelopeformatVersion- envelope format version of the verified envelopepolicyVersion- policy version recorded in the envelopepepperKeyId- pepper key id recorded in the envelope, if any
- All Implemented Interfaces:
CredentialVerificationResult
- Enclosing interface:
CredentialVerificationResult
public static record CredentialVerificationResult.Verified(String originalEncodedHash, CredentialType credentialType, String algorithm, String providerId, int formatVersion, int policyVersion, Optional<String> pepperKeyId)
extends Record
implements CredentialVerificationResult
Successful verification. Carries every piece of metadata the caller
needs to decide whether to perform a transparent rehash and to do
so atomically against the credential store.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CredentialVerificationResult
CredentialVerificationResult.Failed, CredentialVerificationResult.VerifiedModifier and TypeInterfaceDescriptionstatic final recordVerification did not succeed.static final recordSuccessful verification. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.Returns the value of thecredentialTyperecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theformatVersionrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoriginalEncodedHashrecord component.Returns the value of thepepperKeyIdrecord component.intReturns the value of thepolicyVersionrecord component.Returns the value of theproviderIdrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Verified
public Verified(String originalEncodedHash, CredentialType credentialType, String algorithm, String providerId, int formatVersion, int policyVersion, Optional<String> pepperKeyId) Creates an instance of aVerifiedrecord class.- Parameters:
originalEncodedHash- the value for theoriginalEncodedHashrecord componentcredentialType- the value for thecredentialTyperecord componentalgorithm- the value for thealgorithmrecord componentproviderId- the value for theproviderIdrecord componentformatVersion- the value for theformatVersionrecord componentpolicyVersion- the value for thepolicyVersionrecord componentpepperKeyId- the value for thepepperKeyIdrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
originalEncodedHash
Returns the value of theoriginalEncodedHashrecord component.- Returns:
- the value of the
originalEncodedHashrecord component
-
credentialType
Returns the value of thecredentialTyperecord component.- Returns:
- the value of the
credentialTyperecord component
-
algorithm
-
providerId
Returns the value of theproviderIdrecord component.- Returns:
- the value of the
providerIdrecord component
-
formatVersion
public int formatVersion()Returns the value of theformatVersionrecord component.- Returns:
- the value of the
formatVersionrecord component
-
policyVersion
public int policyVersion()Returns the value of thepolicyVersionrecord component.- Returns:
- the value of the
policyVersionrecord component
-
pepperKeyId
Returns the value of thepepperKeyIdrecord component.- Returns:
- the value of the
pepperKeyIdrecord component
-