Class JwtTokenManager
java.lang.Object
org.gridgain.internal.security.jwt.JwtTokenManager
- All Implemented Interfaces:
org.apache.ignite.internal.lang.Debuggable,org.apache.ignite.internal.manager.IgniteComponent,TokenManager
JWT token manager.
-
Field Summary
Fields inherited from interface org.apache.ignite.internal.lang.Debuggable
INDENTATION -
Constructor Summary
ConstructorsConstructorDescriptionJwtTokenManager(org.apache.ignite.internal.util.ClusterNameProvider clusterNameProvider, org.apache.ignite.internal.util.NodeNameProvider nodeNameProvider, org.apache.ignite.internal.security.jwt.configuration.JwtConfiguration jwtConfiguration, NodeKeyManager keyManager, org.apache.ignite.internal.metastorage.MetaStorageManager metaStorageManager, org.gridgain.internal.rbac.authorization.Authorizer authorizer, org.apache.ignite.internal.event.EventProducer<org.apache.ignite.internal.security.authentication.event.AuthenticationEvent, org.apache.ignite.internal.security.authentication.event.AuthenticationEventParameters> authEventProducer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionissueToken(org.apache.ignite.internal.security.authentication.UserDetails userDetails) Issue token that can be used for authentication.revokeAllTokens(String username) Revokes all tokens for a given username issued on or before the current moment.revokeToken(String token) Revokes token.startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) org.apache.ignite.internal.security.authentication.UserDetailsvalidateAndExtractDetails(String token) Validate token and return user details that were constructed from token.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.internal.lang.Debuggable
dumpStateMethods inherited from interface org.apache.ignite.internal.manager.IgniteComponent
beforeNodeStop, stopAsync
-
Constructor Details
-
JwtTokenManager
public JwtTokenManager(org.apache.ignite.internal.util.ClusterNameProvider clusterNameProvider, org.apache.ignite.internal.util.NodeNameProvider nodeNameProvider, org.apache.ignite.internal.security.jwt.configuration.JwtConfiguration jwtConfiguration, NodeKeyManager keyManager, org.apache.ignite.internal.metastorage.MetaStorageManager metaStorageManager, org.gridgain.internal.rbac.authorization.Authorizer authorizer, org.apache.ignite.internal.event.EventProducer<org.apache.ignite.internal.security.authentication.event.AuthenticationEvent, org.apache.ignite.internal.security.authentication.event.AuthenticationEventParameters> authEventProducer) Constructor.- Parameters:
clusterNameProvider- Cluster name provider.nodeNameProvider- Node name provider.jwtConfiguration- JWT configuration.keyManager- Node key manager.metaStorageManager- Meta storage manager.authorizer- Authorizer.
-
-
Method Details
-
issueToken
public String issueToken(org.apache.ignite.internal.security.authentication.UserDetails userDetails) Description copied from interface:TokenManagerIssue token that can be used for authentication.- Specified by:
issueTokenin interfaceTokenManager- Parameters:
userDetails- User details.- Returns:
- Token.
-
validateAndExtractDetails
public org.apache.ignite.internal.security.authentication.UserDetails validateAndExtractDetails(String token) Description copied from interface:TokenManagerValidate token and return user details that were constructed from token. If token is invalid, returnnull.- Specified by:
validateAndExtractDetailsin interfaceTokenManager- Parameters:
token- Token. Can benull.- Returns:
- User details.
-
revokeToken
Description copied from interface:TokenManagerRevokes token.- Specified by:
revokeTokenin interfaceTokenManager- Parameters:
token- Token.
-
revokeAllTokens
Description copied from interface:TokenManagerRevokes all tokens for a given username issued on or before the current moment.- Specified by:
revokeAllTokensin interfaceTokenManager- Parameters:
username- Username.
-
startAsync
public CompletableFuture<Void> startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) - Specified by:
startAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-
stopAsync
public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) - Specified by:
stopAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-