Index
All Classes and Interfaces|All Packages
D
- DAYS - Enum constant in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Represents the time unit in days.
E
- equals(Object) - Method in record class tech.lastbox.jwt.Token
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class tech.lastbox.jwt.TokenValidation
-
Indicates whether some other object is "equal to" this one.
- ExpirationTimeUnit - Enum Class in tech.lastbox.jwt
-
Enum representing various time units for expiration (Days, Hours, Minutes, Seconds).
- expiresIn() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
expiresInrecord component.
F
- findById(String) - Method in interface tech.lastbox.jwt.TokenStore
-
Finds a token entity by its token string.
G
- generateToken(String, String) - Method in class tech.lastbox.jwt.JwtService
-
Generates a JWT for the specified subject with a given issuer.
- generateToken(String, String, List<String>) - Method in class tech.lastbox.jwt.JwtService
-
Generates a JWT for the specified subject with a given issuer and scope.
- getAlgorithm(String) - Method in enum class tech.lastbox.jwt.JwtAlgorithm
-
Abstract method that must be implemented by each constant to return the corresponding
Algorithminstance using the provided secret key. - getChronoUnit() - Method in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Returns the
ChronoUnitassociated with this expiration time unit. - getExpirationAmount() - Method in class tech.lastbox.jwt.JwtConfig
-
Gets the expiration time unit used for the JWT.
- getExpirationTimeUnit() - Method in class tech.lastbox.jwt.JwtConfig
-
Gets the expiration time unit used for the JWT.
- getExpiresIn() - Method in class tech.lastbox.jwt.TokenEntity
-
Gets the expiration time of the token.
- getIssuedAt() - Method in class tech.lastbox.jwt.TokenEntity
-
Gets the issued time of the token.
- getIssuer() - Method in class tech.lastbox.jwt.TokenEntity
-
Retrieves the issuer of the token.
- getJwtAlgorithm() - Method in class tech.lastbox.jwt.JwtConfig
-
Gets the JWT signing algorithm.
- getScope() - Method in class tech.lastbox.jwt.TokenEntity
-
Retrieves the scope associated with the token.
- getSecretKey() - Method in class tech.lastbox.jwt.JwtConfig
-
Gets the secret key used for JWT signing.
- getSubject() - Method in class tech.lastbox.jwt.TokenEntity
-
Gets the subject associated with the token.
- getToken() - Method in class tech.lastbox.jwt.TokenEntity
-
Gets the token string.
- getToken(String) - Method in class tech.lastbox.jwt.JwtService
-
Retrieves and validates a token from the token store or decodes it if the store is not available.
- getTokenStore() - Method in class tech.lastbox.jwt.JwtConfig
-
Gets the token store used for saving and retrieving token entities.
- getTrustedIssuers() - Method in class tech.lastbox.jwt.JwtConfig
-
Retrieves the set of trusted issuers allowed for validating JWTs.
H
- hashCode() - Method in record class tech.lastbox.jwt.Token
-
Returns a hash code value for this object.
- hashCode() - Method in record class tech.lastbox.jwt.TokenValidation
-
Returns a hash code value for this object.
- HMAC256 - Enum constant in enum class tech.lastbox.jwt.JwtAlgorithm
-
HMAC256 algorithm for signing JWTs using a 256-bit key.
- HMAC384 - Enum constant in enum class tech.lastbox.jwt.JwtAlgorithm
-
HMAC384 algorithm for signing JWTs using a 384-bit key.
- HMAC512 - Enum constant in enum class tech.lastbox.jwt.JwtAlgorithm
-
HMAC512 algorithm for signing JWTs using a 512-bit key.
- HOURS - Enum constant in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Represents the time unit in hours.
I
- isExpired() - Method in class tech.lastbox.jwt.TokenEntity
-
Checks if the token is expired.
- isRevoked() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
isRevokedrecord component. - isRevoked() - Method in class tech.lastbox.jwt.TokenEntity
-
Checks if the token is revoked.
- issuedAt() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
issuedAtrecord component. - issuer() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
issuerrecord component. - isValid() - Method in class tech.lastbox.jwt.TokenEntity
-
Checks if the token is valid.
- isValid() - Method in record class tech.lastbox.jwt.TokenValidation
-
Returns the value of the
isValidrecord component.
J
- JwtAlgorithm - Enum Class in tech.lastbox.jwt
-
Enum representing the different JWT signing algorithms.
- JwtConfig - Class in tech.lastbox.jwt
-
Configuration class for JWT (JSON Web Token) settings.
- JwtConfig(JwtAlgorithm, String, String, long, ExpirationTimeUnit) - Constructor for class tech.lastbox.jwt.JwtConfig
-
Constructs a JwtConfig without a token store.
- JwtConfig(JwtAlgorithm, String, String, long, ExpirationTimeUnit, TokenStore) - Constructor for class tech.lastbox.jwt.JwtConfig
-
Constructs a JwtConfig instance with all configurations, including a token store.
- JwtConfig(JwtAlgorithm, String, List<String>, long, ExpirationTimeUnit) - Constructor for class tech.lastbox.jwt.JwtConfig
-
Constructs a JwtConfig with multiple issuers and no token store.
- JwtConfig(JwtAlgorithm, String, List<String>, long, ExpirationTimeUnit, TokenStore) - Constructor for class tech.lastbox.jwt.JwtConfig
-
Constructs a JwtConfig with multiple issuers and a token store.
- JwtService - Class in tech.lastbox.jwt
-
Service class responsible for managing JWT creation, validation, and revocation.
- JwtService(JwtConfig) - Constructor for class tech.lastbox.jwt.JwtService
-
Constructs a new
JwtServiceinstance with the provided configuration.
M
- MINUTES - Enum constant in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Represents the time unit in minutes.
R
- revokeToken(String) - Method in class tech.lastbox.jwt.JwtService
-
Revokes the specified token, marking it as invalid in the token store.
S
- save(TokenEntity) - Method in interface tech.lastbox.jwt.TokenStore
-
Saves a token entity in the store.
- scope() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
scoperecord component. - SECONDS - Enum constant in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Represents the time unit in seconds.
- setRevoked(boolean) - Method in class tech.lastbox.jwt.TokenEntity
-
Sets the revocation status of the token.
- subject() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
subjectrecord component.
T
- tech.lastbox.jwt - package tech.lastbox.jwt
- toDuration(long) - Method in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Converts the given amount of time to a
Durationusing this expiration time unit. - token() - Method in record class tech.lastbox.jwt.Token
-
Returns the value of the
tokenrecord component. - Token - Record Class in tech.lastbox.jwt
-
Represents a JWT (JSON Web Token) in the system.
- Token(String, String, LocalDateTime, LocalDateTime, String, List<String>, boolean) - Constructor for record class tech.lastbox.jwt.Token
-
Creates an instance of a
Tokenrecord class. - TokenEntity - Class in tech.lastbox.jwt
-
Entity class representing a token in the system.
- TokenEntity() - Constructor for class tech.lastbox.jwt.TokenEntity
-
Default constructor.
- TokenEntity(String, Instant, Instant, String, String, List<String>) - Constructor for class tech.lastbox.jwt.TokenEntity
-
Constructor to initialize a token entity with specified values.
- tokenOptional() - Method in record class tech.lastbox.jwt.TokenValidation
-
Returns the value of the
tokenOptionalrecord component. - TokenStore - Interface in tech.lastbox.jwt
-
Interface for storing and retrieving token entities.
- TokenValidation - Record Class in tech.lastbox.jwt
-
A record representing the validation result of a JWT (JSON Web Token).
- TokenValidation(Optional<Token>, boolean) - Constructor for record class tech.lastbox.jwt.TokenValidation
-
Creates an instance of a
TokenValidationrecord class. - toString() - Method in record class tech.lastbox.jwt.Token
-
Returns a string representation of this record class.
- toString() - Method in record class tech.lastbox.jwt.TokenValidation
-
Returns a string representation of this record class.
V
- validateToken(String) - Method in class tech.lastbox.jwt.JwtService
-
Retrieves and validates a token either from the token store or by decoding it directly.
- valueOf(String) - Static method in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class tech.lastbox.jwt.JwtAlgorithm
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class tech.lastbox.jwt.ExpirationTimeUnit
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class tech.lastbox.jwt.JwtAlgorithm
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages