Interface TokenPlatformClient
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
NoAuthTokenPlatformClient
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 Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the client and releases any resources (e.g., gRPC channels).issueTokenAsync(TokenRequestContext context, Executor executor) Issues a Logical Access Token (LAT) for the specified context asynchronously.
-
Method Details
-
issueTokenAsync
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 informationexecutor- 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:
closein interfaceAutoCloseable
-