Record Class IdSessionSecretIdentifier
java.lang.Object
java.lang.Record
com.io7m.idstore.server.service.sessions.IdSessionSecretIdentifier
- Record Components:
value
- The identifier
A session identifier. This value is expected to be treated as a secret, as
getting access to someone's session identifier allows access to the server
authenticated as that user.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static IdSessionSecretIdentifier
generate()
Generate a random identifier.static IdSessionSecretIdentifier
generate
(SecureRandom rng) Generate a random identifier.final int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
IdSessionSecretIdentifier
A session identifier. This value is expected to be treated as a secret, as getting access to someone's session identifier allows access to the server authenticated as that user.- Parameters:
value
- The identifier
-
-
Method Details
-
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. -
generate
Generate a random identifier.- Returns:
- The identifier
-
generate
Generate a random identifier.- Parameters:
rng
- A random number generator- Returns:
- The identifier
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-