Skip to content

Commit a9405f4

Browse files
chore: update token auth default to 'false' (#195)
* chore: update token auth default to 'false' * chore: update changelog
1 parent 145426a commit a9405f4

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
## [2.2.0] - Unreleased
44
### Changes
5-
- update required protocol version to 12
5+
- update required protocol version to 14
66
- integrate latest docs incl. troubleshooting
7+
- default to oauth2 when authenticating
78

89
## [2.2.0] - v20240619.131238
910
### Changes

plugin/src/main/java/io/snyk/eclipse/plugin/properties/preferences/Preferences.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static synchronized Preferences getInstance(PreferenceStore store) {
109109
}
110110

111111
if (getPref(USE_TOKEN_AUTH) == null) {
112-
store.put(USE_TOKEN_AUTH, "true");
112+
store.put(USE_TOKEN_AUTH, "false");
113113
}
114114
}
115115

plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private void setupProcessBuilderBase(ProcessBuilder pb) {
127127

128128
String token = Preferences.getInstance().getAuthToken();
129129
if (token != null && !token.isBlank()) {
130-
if (Preferences.getInstance().getBooleanPref(Preferences.USE_TOKEN_AUTH, true)) {
130+
if (Preferences.getInstance().getBooleanPref(Preferences.USE_TOKEN_AUTH, false)) {
131131
pb.environment().put(EnvironmentConstants.ENV_SNYK_TOKEN, token);
132132
pb.environment().remove(EnvironmentConstants.ENV_OAUTH_ACCESS_TOKEN);
133133
} else {

plugin/src/main/java/io/snyk/languageserver/LsConfigurationUpdater.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Settings getCurrentSettings() {
5151
}
5252
String enableTrustedFolderFeature = Boolean.TRUE.toString();
5353
String scanningMode = preferences.getBooleanPref(Preferences.SCANNING_MODE_AUTOMATIC) ? "automatic" : "manual";
54-
boolean useTokenAuth = preferences.getBooleanPref(Preferences.USE_TOKEN_AUTH, true);
54+
boolean useTokenAuth = preferences.getBooleanPref(Preferences.USE_TOKEN_AUTH, false);
5555
var authMethod = "oauth";
5656
if (useTokenAuth) {
5757
authMethod = "token";

0 commit comments

Comments
 (0)