public interface JwtConfiguration extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
JwtConfiguration.Builder
Builder to create
JwtConfiguration instances. |
static class |
JwtConfiguration.InvalidJwtConfigurationException
Exception for
JwtConfiguration errors. |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_KEY
Default
Context resource reference |
| Modifier and Type | Method and Description |
|---|---|
static JwtConfiguration |
build(JwtConfigProperties properties)
Build a
JwtConfiguration instance using given configuration properties. |
static JwtConfiguration.Builder |
builder()
Builder to create a
JwtConfiguration |
static Optional<JwtConfiguration> |
getCurrent()
Convenience method to obtain the current
JwtConfiguration made available as Context resource,
using default ClassLoader. |
long |
getExpireTime()
Get JWT token expire time.
|
Optional<String> |
getIssuer()
Get the JWT token issuer (iss)
|
Optional<Key> |
getPrivateKey()
Get the private key to be used with asymmetric JWT signature algorithms.
|
Optional<Key> |
getPublicKey()
Get the public key to be used with asymmetric JWT signature algorithms.
|
Optional<byte[]> |
getSharedKey()
Get the shared key to be used with symmetric JWT signature algorithms.
|
JwtSignatureAlgorithm |
getSignatureAlgorithm()
Get the JWT token signature algorithm.
|
boolean |
isIncludeDetails()
Get whether to include
Authentication details in JWT token at token generation time. |
boolean |
isIncludePermissions()
Get whether to include
Authentication permissions in JWT token at token generation time. |
boolean |
isNotBeforeNow()
Get whether to set the
nbf (not before) JWT claim to the timestamp at which the token is created. |
JwtSignatureAlgorithm getSignatureAlgorithm()
JwtSignatureAlgorithm.NONE if the JWT token is not signedOptional<byte[]> getSharedKey()
Optional<Key> getPrivateKey()
Optional<Key> getPublicKey()
long getExpireTime()
<=0 means token never expiresboolean isNotBeforeNow()
nbf (not before) JWT claim to the timestamp at which the token is created.true to set the nbf (not before) JWT claim to the timestamp at which the token
is createdboolean isIncludeDetails()
Authentication details in JWT token at token generation time.true to include Authentication details in JWT token, false otherwiseboolean isIncludePermissions()
Authentication permissions in JWT token at token generation time.true to include Authentication permissions in JWT token, false
otherwisestatic Optional<JwtConfiguration> getCurrent()
JwtConfiguration made available as Context resource,
using default ClassLoader.
See Context.resource(String, Class) for details about context resources availability conditions.
static JwtConfiguration.Builder builder()
JwtConfigurationstatic JwtConfiguration build(JwtConfigProperties properties) throws JwtConfiguration.InvalidJwtConfigurationException
JwtConfiguration instance using given configuration properties.properties - JWT configuration property sourceJwtConfiguration.InvalidJwtConfigurationException - Error building configurationCopyright © 2019 The Holon Platform. All rights reserved.