Record Class AdmissionKey
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signaling.admission.AdmissionKey
A provider-issued admission key epoch. Tokens under it are accepted until
retireAfter.-
Constructor Summary
ConstructorsConstructorDescriptionAdmissionKey(String keyId, String secret) AdmissionKey(String keyId, String secret, long retireAfter) Creates an instance of aAdmissionKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keyId()Returns the value of thekeyIdrecord component.longReturns the value of theretireAfterrecord component.secret()Returns the value of thesecretrecord component.toString()Returns a string representation of this record class.static booleanvalidSecret(String secret) A secret is 43 base64url characters encoding 32 random bytes.
-
Constructor Details
-
AdmissionKey
-
AdmissionKey
Creates an instance of aAdmissionKeyrecord class.- Parameters:
keyId- the value for thekeyIdrecord componentsecret- the value for thesecretrecord componentretireAfter- the value for theretireAfterrecord component
-
-
Method Details
-
validSecret
A secret is 43 base64url characters encoding 32 random bytes. Derivations use the characters' bytes, never the decoded value. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
secret
Returns the value of thesecretrecord component.- Returns:
- the value of the
secretrecord component
-
retireAfter
public long retireAfter()Returns the value of theretireAfterrecord component.- Returns:
- the value of the
retireAfterrecord component
-