Interface TokenManager

All Superinterfaces:
org.apache.ignite.internal.lang.Debuggable, org.apache.ignite.internal.manager.IgniteComponent
All Known Implementing Classes:
JwtTokenManager

public interface TokenManager extends org.apache.ignite.internal.manager.IgniteComponent
Token manager.
  • Field Summary

    Fields inherited from interface org.apache.ignite.internal.lang.Debuggable

    INDENTATION
  • Method Summary

    Modifier and Type
    Method
    Description
    issueToken(org.apache.ignite.internal.security.authentication.UserDetails userDetails)
    Issue token that can be used for authentication.
    Revokes all tokens for a given username issued on or before the current moment.
    Revokes token.
    org.apache.ignite.internal.security.authentication.UserDetails
    Validate token and return user details that were constructed from token.

    Methods inherited from interface org.apache.ignite.internal.lang.Debuggable

    dumpState

    Methods inherited from interface org.apache.ignite.internal.manager.IgniteComponent

    beforeNodeStop, startAsync, stopAsync, stopAsync
  • Method Details

    • issueToken

      String issueToken(org.apache.ignite.internal.security.authentication.UserDetails userDetails)
      Issue token that can be used for authentication.
      Parameters:
      userDetails - User details.
      Returns:
      Token.
    • validateAndExtractDetails

      org.apache.ignite.internal.security.authentication.UserDetails validateAndExtractDetails(String token)
      Validate token and return user details that were constructed from token. If token is invalid, return null.
      Parameters:
      token - Token. Can be null.
      Returns:
      User details.
      Throws:
      JwtValidationException - If token is invalid.
    • revokeToken

      CompletableFuture<Void> revokeToken(String token)
      Revokes token.
      Parameters:
      token - Token.
    • revokeAllTokens

      CompletableFuture<Void> revokeAllTokens(String username)
      Revokes all tokens for a given username issued on or before the current moment.
      Parameters:
      username - Username.