Record Class AuthConfig.TokenConfig
java.lang.Object
java.lang.Record
com.loomcache.common.config.AuthConfig.TokenConfig
- Enclosing class:
AuthConfig
public static record AuthConfig.TokenConfig(boolean enabled, Map<String, AuthConfig.TokenCredential> credentialsBySha256)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTokenConfig(boolean enabled, Map<String, AuthConfig.TokenCredential> credentialsBySha256) Creates an instance of aTokenConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecredentialsBySha256record component.static AuthConfig.TokenConfigdisabled()booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.findCredential(byte[] token) final inthashCode()Returns a hash code value for this object.static StringnormalizeSha256Hex(String sha256Hex) static Stringsha256Hex(byte[] token) static Stringfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenConfig
Creates an instance of aTokenConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componentcredentialsBySha256- the value for thecredentialsBySha256record component
-
-
Method Details
-
disabled
-
findCredential
-
sha256Hex
-
sha256Hex
-
normalizeSha256Hex
-
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. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
credentialsBySha256
Returns the value of thecredentialsBySha256record component.- Returns:
- the value of the
credentialsBySha256record component
-