Record Class TokenService.Token
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.plugins.pat.api.TokenService.Token
- Enclosing interface:
- TokenService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappName()Returns the value of theappNamerecord component.Returns the value of theauthoritiesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationrecord component.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.secret()Returns the value of thesecretrecord component.final StringtoString()Returns a string representation of this record class.userId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
Token
public Token(long id, String name, String appName, Long userId, String secret, Instant expiration, List<String> authorities) Creates an instance of aTokenrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentappName- the value for theappNamerecord componentuserId- the value for theuserIdrecord componentsecret- the value for thesecretrecord componentexpiration- the value for theexpirationrecord componentauthorities- the value for theauthoritiesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
appName
Returns the value of theappNamerecord component.- Returns:
- the value of the
appNamerecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
secret
Returns the value of thesecretrecord component.- Returns:
- the value of the
secretrecord component
-
expiration
Returns the value of theexpirationrecord component.- Returns:
- the value of the
expirationrecord component
-
authorities
Returns the value of theauthoritiesrecord component.- Returns:
- the value of the
authoritiesrecord component
-