@InternalApi public class EndpointTokenSource extends Object implements TokenSource
TokenSource to obtain the initial control plane token.| Constructor and Description |
|---|
EndpointTokenSource(TokenSource cpTokenSource,
String authDetails,
HttpClient httpClient,
String host)
Constructs a new EndpointTokenSource.
|
| Modifier and Type | Method and Description |
|---|---|
Token |
getToken()
Fetches an endpoint-specific dataplane token by exchanging a control plane token.
|
public EndpointTokenSource(TokenSource cpTokenSource, String authDetails, HttpClient httpClient, String host)
cpTokenSource - The TokenSource used to obtain the control plane token.authDetails - The authorization details required for the token exchange.httpClient - The HttpClient used to make the token exchange request.host - The host for the token exchange request.IllegalArgumentException - if authDetails is empty or host is empty.NullPointerException - if any of the parameters are null.public Token getToken()
This method first obtains a control plane token from the configured cpTokenSource.
It then uses this token as an assertion along with the provided authDetails to request
a new, more scoped dataplane token from the Databricks OAuth token endpoint ().
getToken in interface TokenSourceToken containing the exchanged dataplane access token, its type, any
accompanying refresh token, and its expiry time.DatabricksException - if the token exchange with the OAuth endpoint fails.IllegalArgumentException - if the token endpoint url is empty.NullPointerException - if any of the parameters are null.Copyright © 2026. All rights reserved.