@@ -44,15 +44,16 @@ void clientAndConsentTest() throws IOException {
4444 .setHttpClient (new CommonsHttpClient .Builder ().withTimeoutSeconds (30 ).build ());
4545 config .resolve ();
4646
47- assertEquals ("tokenEndPointFromServer" , config .getOidcEndpoints ().getTokenEndpoint ());
47+ assertEquals (
48+ "tokenEndPointFromServer" , config .getDatabricksOidcEndpoints ().getTokenEndpoint ());
4849
4950 OAuthClient testClient =
5051 new OAuthClient .Builder ()
5152 .withHttpClient (config .getHttpClient ())
5253 .withClientId (config .getClientId ())
5354 .withClientSecret (config .getClientSecret ())
5455 .withHost (config .getHost ())
55- .withOpenIDConnectEndpoints (config .getOidcEndpoints ())
56+ .withOpenIDConnectEndpoints (config .getDatabricksOidcEndpoints ())
5657 .withRedirectUrl (config .getEffectiveOAuthRedirectUrl ())
5758 .withScopes (config .getScopes ())
5859 .build ();
@@ -92,15 +93,16 @@ void clientAndConsentTestWithCustomRedirectUrl() throws IOException {
9293 .setScopes (Arrays .asList ("sql" ));
9394 config .resolve ();
9495
95- assertEquals ("tokenEndPointFromServer" , config .getOidcEndpoints ().getTokenEndpoint ());
96+ assertEquals (
97+ "tokenEndPointFromServer" , config .getDatabricksOidcEndpoints ().getTokenEndpoint ());
9698
9799 OAuthClient testClient =
98100 new OAuthClient .Builder ()
99101 .withHttpClient (config .getHttpClient ())
100102 .withClientId (config .getClientId ())
101103 .withClientSecret (config .getClientSecret ())
102104 .withHost (config .getHost ())
103- .withOpenIDConnectEndpoints (config .getOidcEndpoints ())
105+ .withOpenIDConnectEndpoints (config .getDatabricksOidcEndpoints ())
104106 .withRedirectUrl (config .getEffectiveOAuthRedirectUrl ())
105107 .withScopes (config .getScopes ())
106108 .build ();
@@ -129,8 +131,9 @@ void openIDConnectEndPointsTestAccounts() throws IOException {
129131 config .resolve ();
130132
131133 String prefix = "https://accounts.cloud.databricks.com/oidc/accounts/" + config .getAccountId ();
132- assertEquals (prefix + "/v1/token" , config .getOidcEndpoints ().getTokenEndpoint ());
133- assertEquals (prefix + "/v1/authorize" , config .getOidcEndpoints ().getAuthorizationEndpoint ());
134+ assertEquals (prefix + "/v1/token" , config .getDatabricksOidcEndpoints ().getTokenEndpoint ());
135+ assertEquals (
136+ prefix + "/v1/authorize" , config .getDatabricksOidcEndpoints ().getAuthorizationEndpoint ());
134137 }
135138
136139 @ Test
@@ -278,7 +281,7 @@ void cacheWithValidRefreshableTokenTest() throws IOException {
278281
279282 // Spy on the config to inject the endpoints.
280283 DatabricksConfig spyConfig = Mockito .spy (config );
281- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
284+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
282285
283286 // Configure provider.
284287 HeaderFactory headerFactory = provider .configure (spyConfig );
@@ -343,7 +346,7 @@ void cacheWithValidNonRefreshableTokenTest() throws IOException {
343346
344347 // Spy on the config to inject the endpoints.
345348 DatabricksConfig spyConfig = Mockito .spy (config );
346- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
349+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
347350
348351 // Configure provider.
349352 HeaderFactory headerFactory = provider .configure (spyConfig );
@@ -415,7 +418,7 @@ void cacheWithInvalidAccessTokenValidRefreshTest() throws IOException {
415418
416419 // Spy on the config to inject the endpoints
417420 DatabricksConfig spyConfig = Mockito .spy (config );
418- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
421+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
419422
420423 // Configure provider
421424 HeaderFactory headerFactory = provider .configure (spyConfig );
@@ -524,7 +527,7 @@ void cacheWithInvalidAccessTokenRefreshFailingTest() throws IOException {
524527
525528 // Spy on the config to inject the endpoints
526529 DatabricksConfig spyConfig = Mockito .spy (config );
527- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
530+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
528531
529532 // Configure provider
530533 HeaderFactory headerFactory = provider .configure (spyConfig );
@@ -610,7 +613,7 @@ void cacheWithInvalidTokensTest() throws IOException {
610613 "https://test.databricks.com/oidc/v1/token" ,
611614 "https://test.databricks.com/oidc/v1/authorize" );
612615 DatabricksConfig spyConfig = Mockito .spy (config );
613- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
616+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
614617
615618 // Configure provider
616619 HeaderFactory headerFactory = provider .configure (spyConfig );
@@ -738,7 +741,7 @@ void externalBrowserAuthWithAzureClientIdTest() throws IOException {
738741 "https://test.azuredatabricks.net/oidc/v1/token" ,
739742 "https://test.azuredatabricks.net/oidc/v1/authorize" );
740743 DatabricksConfig spyConfig = Mockito .spy (config );
741- Mockito .doReturn (endpoints ).when (spyConfig ).getOidcEndpoints ();
744+ Mockito .doReturn (endpoints ).when (spyConfig ).getDatabricksOidcEndpoints ();
742745
743746 // Configure provider
744747 HeaderFactory headerFactory = provider .configure (spyConfig );
0 commit comments