Package org.restheart.plugins.security
Interface TokenManager
- All Superinterfaces:
Authenticator,ConfigurablePlugin,io.undertow.security.idm.IdentityManager,Plugin
Interface for token managers
See https://restheart.org/docs/plugins/security-plugins/#token-managers
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.undertow.util.HttpStringstatic final io.undertow.util.HttpStringstatic final io.undertow.util.HttpStringstatic final io.undertow.util.HttpString -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.security.idm.PasswordCredentialget(io.undertow.security.idm.Account account) retrieves of generate a token valid for the accountvoidinjectTokenHeaders(io.undertow.server.HttpServerExchange exchange, io.undertow.security.idm.PasswordCredential token) injects the token headers in the responsevoidinvalidate(io.undertow.security.idm.Account account) invalidates the token bound to the accountvoidupdate(io.undertow.security.idm.Account account) updates the account bound to a tokenMethods inherited from interface org.restheart.plugins.security.Authenticator
verify, verify, verifyMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefault
-
Field Details
-
AUTH_TOKEN_HEADER
static final io.undertow.util.HttpString AUTH_TOKEN_HEADER -
AUTH_TOKEN_VALID_HEADER
static final io.undertow.util.HttpString AUTH_TOKEN_VALID_HEADER -
AUTH_TOKEN_LOCATION_HEADER
static final io.undertow.util.HttpString AUTH_TOKEN_LOCATION_HEADER -
ACCESS_CONTROL_EXPOSE_HEADERS
static final io.undertow.util.HttpString ACCESS_CONTROL_EXPOSE_HEADERS
-
-
Method Details
-
get
io.undertow.security.idm.PasswordCredential get(io.undertow.security.idm.Account account) retrieves of generate a token valid for the account- Parameters:
account-- Returns:
- the token for the account
-
invalidate
void invalidate(io.undertow.security.idm.Account account) invalidates the token bound to the account- Parameters:
account-
-
update
void update(io.undertow.security.idm.Account account) updates the account bound to a token- Parameters:
account-
-
injectTokenHeaders
void injectTokenHeaders(io.undertow.server.HttpServerExchange exchange, io.undertow.security.idm.PasswordCredential token) injects the token headers in the response- Parameters:
exchange-token-
-