Package org.restheart.plugins.security
Interface TokenManager
-
- All Superinterfaces:
Authenticator,ConfigurablePlugin,io.undertow.security.idm.IdentityManager,Plugin
public interface TokenManager extends Authenticator, ConfigurablePlugin
Interface for token managers- Author:
- Andrea Di Cesare
-
-
Field Summary
Fields Modifier and Type Field Description static io.undertow.util.HttpStringACCESS_CONTROL_EXPOSE_HEADERSstatic io.undertow.util.HttpStringAUTH_TOKEN_HEADERstatic io.undertow.util.HttpStringAUTH_TOKEN_LOCATION_HEADERstatic io.undertow.util.HttpStringAUTH_TOKEN_VALID_HEADER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.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 token-
Methods inherited from interface org.restheart.plugins.security.Authenticator
verify, verify, verify
-
-
-
-
Field Detail
-
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 Detail
-
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-
-
-