Package org.graylog2.security
Class IndexerJwtAuthTokenProvider
java.lang.Object
org.graylog2.security.IndexerJwtAuthTokenProvider
- All Implemented Interfaces:
jakarta.inject.Provider<String>
@Singleton
public class IndexerJwtAuthTokenProvider
extends Object
implements jakarta.inject.Provider<String>
Caution, this provider returns not just the token itself but also the "Bearer " prefix, so the value can be directly
used as an HTTP header content.
-
Constructor Summary
ConstructorsConstructorDescriptionIndexerJwtAuthTokenProvider(JwtSecret jwtSecret, com.github.joschi.jadconfig.util.Duration tokenExpirationDuration, com.github.joschi.jadconfig.util.Duration cachingDuration) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateToken(JwtSecret jwtSecret, com.github.joschi.jadconfig.util.Duration tokenExpirationDuration) get()
-
Constructor Details
-
IndexerJwtAuthTokenProvider
@Inject public IndexerJwtAuthTokenProvider(JwtSecret jwtSecret, @Named("indexer_jwt_auth_token_expiration_duration") com.github.joschi.jadconfig.util.Duration tokenExpirationDuration, @Named("indexer_jwt_auth_token_caching_duration") com.github.joschi.jadconfig.util.Duration cachingDuration)
-
-
Method Details
-
createToken
-
get
- Specified by:
getin interfacejakarta.inject.Provider<String>
-