Record Class TokenDomain
A token domain controls how token fingerprints and check-hashes are derived from a particular token. Even with identical token contents, different domain contexts are expected to produce entirely different derivations (with an extremely high probability).
Since tokens are just opaque sequences of high entropy bytes (with an arbitrary prefix), they do not by themselves provide any kind of inherent domain separation. Token domains exist to allow for explicit domain separation between different usages of tokens.
Fingerprint contexts will usually be the same across an entire deployment of a token evaluation infrastructure, in order to allow for identifying tokens "globally" across that deployment.
Access check hash contexts should be unique for each logical token evaluation audience, ensuring that access hashes from an unrelated audience (with a different context) can never be made to match, be it accidentally or deliberately.
-
Constructor Summary
ConstructorsConstructorDescriptionTokenDomain(byte[] checkHashContext) Creates an instance of aTokenDomainrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the value of thecheckHashContextrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static TokenDomaintoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenDomain
public TokenDomain(byte[] checkHashContext) Creates an instance of aTokenDomainrecord class.- Parameters:
checkHashContext- the value for thecheckHashContextrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
of
-
checkHashContext
public byte[] checkHashContext()Returns the value of thecheckHashContextrecord component.- Returns:
- the value of the
checkHashContextrecord component
-