public class DataPlaneTokenSource extends Object
DatabricksOAuthTokenSource for obtaining
control plane tokens, which may then be exchanged or used to authorize requests for data plane
tokens. Cached EndpointTokenSource instances are used to efficiently reuse tokens for
repeated requests to the same endpoint with the same authorization context.| Constructor and Description |
|---|
DataPlaneTokenSource(HttpClient httpClient,
TokenSource cpTokenSource,
String host)
Constructs a DataPlaneTokenSource.
|
| Modifier and Type | Method and Description |
|---|---|
Token |
getToken(String endpoint,
String authDetails)
Retrieves a token for the specified endpoint and authorization details.
|
public DataPlaneTokenSource(HttpClient httpClient, TokenSource cpTokenSource, String host)
httpClient - The HttpClient for token requests.cpTokenSource - The TokenSource for control plane tokens.host - The host for the token exchange request.NullPointerException - if any parameter is null.IllegalArgumentException - if the host is empty.public Token getToken(String endpoint, String authDetails)
EndpointTokenSource if available, otherwise creates and caches a new one.endpoint - The target data plane service endpoint.authDetails - Authorization details for the endpoint.Token.NullPointerException - if either parameter is null.IllegalArgumentException - if either parameter is empty.DatabricksException - if the token request fails.Copyright © 2025. All rights reserved.