public class EndpointTokenSource extends RefreshableTokenSource
TokenSource to obtain the initial control plane token.token| Constructor and Description |
|---|
EndpointTokenSource(TokenSource cpTokenSource,
String authDetails,
HttpClient httpClient,
String host)
Constructs a new EndpointTokenSource.
|
| Modifier and Type | Method and Description |
|---|---|
protected Token |
refresh()
Fetches an endpoint-specific dataplane token by exchanging a control plane token.
|
getToken, retrieveTokenpublic 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.protected Token refresh()
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 ().
refresh in class RefreshableTokenSourceToken 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 © 2025. All rights reserved.