Record Class ApiKeyPrincipal<G>
java.lang.Object
java.lang.Record
dev.relism.flash.ext.security.apikey.ApiKeyPrincipal<G>
- All Implemented Interfaces:
dev.relism.flash.ext.security.Principal
public record ApiKeyPrincipal<G>(String name, G grant)
extends Record
implements dev.relism.flash.ext.security.Principal
A caller authenticated by an API key, carrying the grant the key was issued with.
-
Constructor Summary
ConstructorsConstructorDescriptionApiKeyPrincipal(String name, G grant) Creates an instance of aApiKeyPrincipalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.grant()Returns the value of thegrantrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.relism.flash.ext.security.Principal
hasAudience, hasScope, logoutUrl
-
Constructor Details
-
ApiKeyPrincipal
Creates an instance of aApiKeyPrincipalrecord class.- Parameters:
name- the value for thenamerecord componentgrant- the value for thegrantrecord component
-
-
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. -
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). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfacedev.relism.flash.ext.security.Principal- Returns:
- the value of the
namerecord component
-
grant
Returns the value of thegrantrecord component.- Returns:
- the value of the
grantrecord component
-