Package io.quarkus.oidc
Interface TokenStateManager
- All Known Implementing Classes:
DefaultTokenStateManager
public interface TokenStateManager
Authorization Code Flow Token State Manager.
It converts the ID, access and refresh tokens returned in the authorization code grant response into a token state
for OIDC Code AuthenticationMechanism to keep it as a session cookie.
For example, default TokenStateManager concatenates all 3 tokens into a single String but does not persist it.
Custom TokenStateManager may choose to keep the tokens in the external storage (DB, file system, etc.) and return
a reference to this storage.
-
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<String>
createTokenState
(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, AuthorizationCodeTokens tokens, OidcRequestContext<String> requestContext) Convert the authorization code flow tokens into a token state.io.smallrye.mutiny.Uni<Void>
deleteTokens
(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, String tokenState, OidcRequestContext<Void> requestContext) Delete the token state.io.smallrye.mutiny.Uni<AuthorizationCodeTokens>
getTokens
(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, String tokenState, OidcRequestContext<AuthorizationCodeTokens> requestContext) Convert the token state into the authorization code flow tokens.
-
Method Details
-
createTokenState
io.smallrye.mutiny.Uni<String> createTokenState(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, AuthorizationCodeTokens tokens, OidcRequestContext<String> requestContext) Convert the authorization code flow tokens into a token state.- Parameters:
routingContext
- the request contextoidcConfig
- the tenant configurationtokens
- the authorization code flow tokensrequestContext
- the request context- Returns:
- the token state
-
getTokens
io.smallrye.mutiny.Uni<AuthorizationCodeTokens> getTokens(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, String tokenState, OidcRequestContext<AuthorizationCodeTokens> requestContext) Convert the token state into the authorization code flow tokens.- Parameters:
routingContext
- the request contextoidcConfig
- the tenant configurationtokenState
- the token staterequestContext
- the request context- Returns:
- the authorization code flow tokens
-
deleteTokens
io.smallrye.mutiny.Uni<Void> deleteTokens(io.vertx.ext.web.RoutingContext routingContext, OidcTenantConfig oidcConfig, String tokenState, OidcRequestContext<Void> requestContext) Delete the token state.- Parameters:
routingContext
- the request contextoidcConfig
- the tenant configurationtokenState
- the token state
-