Skip to content

Commit 6ba5ef9

Browse files
Changelogs + fmt
1 parent 9d92856 commit 6ba5ef9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

NEXT_CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# NEXT CHANGELOG
22

3-
## Release v0.68.0
3+
## Release v0.67.1
44

55
### New Features and Improvements
66

7+
* Add a new config attribute `DATABRICKS_DISABLE_OAUTH_REFRESH_TOKEN` to disable requesting
8+
refresh tokens by default (by adding the `offline_access` scope) in OAuth exchanges. This
9+
option does not remove the scope from the user provided scopes if present.
10+
711
### Bug Fixes
812

913
### Documentation

databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ public class DatabricksConfig {
176176
private Duration oauthBrowserAuthTimeout;
177177

178178
/**
179-
* Disable automatically adding the offline_access scope to the OAuth authentication
180-
* request to request refresh tokens. Note that this does not remove the scope if it
181-
* is explicitly provided by the user.
179+
* Disable automatically adding the offline_access scope to the OAuth authentication request to
180+
* request refresh tokens. Note that this does not remove the scope if it is explicitly provided
181+
* by the user.
182182
*/
183183
@ConfigAttribute(env = "DATABRICKS_DISABLE_OAUTH_REFRESH_TOKEN")
184184
private Boolean disableOauthRefreshToken;

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/ExternalBrowserCredentialsProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import java.nio.file.Path;
88
import java.util.ArrayList;
99
import java.util.HashSet;
10+
import java.util.List;
1011
import java.util.Objects;
1112
import java.util.Optional;
12-
import java.util.List;
1313
import java.util.Set;
1414
import org.slf4j.Logger;
1515
import org.slf4j.LoggerFactory;
@@ -110,7 +110,7 @@ protected List<String> getScopes(DatabricksConfig config) {
110110
// Get user-provided scopes and add required default scopes.
111111
Set<String> scopes = new HashSet<>(config.getScopes());
112112
// Requesting a refresh token is most of the time the right thing to do to enable
113-
// long-lived access to the API. However, some Identity Providers do not support
113+
// long-lived access to the API. However, some Identity Providers do not support
114114
// refresh tokens.
115115
if (!config.getDisableOauthRefreshToken()) {
116116
scopes.add("offline_access");

0 commit comments

Comments
 (0)