@InternalApi public class ExternalBrowserCredentialsProvider extends Object implements CredentialsProvider
CredentialsProvider which implements the Authorization Code + PKCE flow by opening a
browser for the user to authorize the application. Uses a specified TokenCache or creates a
default one if none is provided.| Constructor and Description |
|---|
ExternalBrowserCredentialsProvider()
Creates a new ExternalBrowserCredentialsProvider with a default TokenCache.
|
ExternalBrowserCredentialsProvider(TokenCache tokenCache)
Creates a new ExternalBrowserCredentialsProvider with the specified TokenCache.
|
| Modifier and Type | Method and Description |
|---|---|
String |
authType()
Returns the authentication type identifier for this credentials provider.
|
OAuthHeaderFactory |
configure(DatabricksConfig config)
Creates and returns a new HeaderFactory to authenticate requests to the Databricks API.
|
protected List<String> |
getScopes(DatabricksConfig config,
OpenIDConnectEndpoints oidcEndpoints) |
public ExternalBrowserCredentialsProvider(TokenCache tokenCache)
tokenCache - the TokenCache to use for caching tokenspublic ExternalBrowserCredentialsProvider()
public String authType()
CredentialsProviderThis method is called internally by the SDK and should not be invoked directly by users. It is used for logging and user-agent identification purposes.
authType in interface CredentialsProviderpublic OAuthHeaderFactory configure(DatabricksConfig config)
CredentialsProviderNote: A new HeaderFactory instance is returned on each invocation.
This method is called internally by the SDK during client initialization and should not be invoked directly by users. The SDK will call this method to obtain a HeaderFactory that will be used to add authentication headers to each API request.
configure in interface CredentialsProviderconfig - the Databricks configuration to use for authenticationprotected List<String> getScopes(DatabricksConfig config, OpenIDConnectEndpoints oidcEndpoints)
Copyright © 2026. All rights reserved.