Interface TokenPlatformClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
NoAuthTokenPlatformClient

public interface TokenPlatformClient extends AutoCloseable
Client interface for obtaining Logical Access Tokens (LAT) from the Token Platform service.

This interface abstracts the gRPC communication with Token Platform (cc-auth-dataplane), allowing services to obtain tokens for authenticating with downstream workloads.

Tokens are short-lived JWTs (typically 15 minutes) that should be passed as Bearer tokens in the Authorization header when calling target services.

See Also:
  • Method Details

    • issueTokenAsync

      CompletableFuture<String> issueTokenAsync(TokenRequestContext context, Executor executor)
      Issues a Logical Access Token (LAT) for the specified context asynchronously.

      This method uses non-blocking retry delays scheduled via the provided executor.

      Parameters:
      context - the token request context containing principal and target information
      executor - executor for scheduling retry delays
      Returns:
      a future that completes with the token or fails with TokenPlatformException
      Throws:
      NullPointerException - if context or executor is null
    • close

      void close()
      Closes the client and releases any resources (e.g., gRPC channels). This method is idempotent - calling it multiple times has no additional effect.
      Specified by:
      close in interface AutoCloseable