Skip to content

Commit 7825cce

Browse files
SNOW-2044130: Remove experimental feature flag from Native OAuth auth… (#2157)
1 parent f91777e commit 7825cce

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/main/java/net/snowflake/client/core/SessionUtil.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ private static WorkloadIdentityAttestation getWorkloadIdentityAttestation(SFLogi
386386

387387
static void checkIfExperimentalAuthnEnabled(AuthenticatorType authenticator) throws SFException {
388388
if (authenticator.equals(AuthenticatorType.PROGRAMMATIC_ACCESS_TOKEN)
389-
|| authenticator.equals(AuthenticatorType.OAUTH_CLIENT_CREDENTIALS)
390-
|| authenticator.equals(AuthenticatorType.OAUTH_AUTHORIZATION_CODE)
391389
|| authenticator.equals(AuthenticatorType.WORKLOAD_IDENTITY)) {
392390
boolean experimentalAuthenticationMethodsEnabled =
393391
Boolean.parseBoolean(systemGetEnv("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION"));

src/test/java/net/snowflake/client/core/SessionUtilTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,11 @@ public void shouldProperlyCheckIfExperimentalAuthEnabled() {
256256
snowflakeUtilMockedStatic
257257
.when(() -> SnowflakeUtil.systemGetEnv("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION"))
258258
.thenReturn(null);
259-
assertThrows(
260-
SFException.class,
259+
assertDoesNotThrow(
261260
() ->
262261
SessionUtil.checkIfExperimentalAuthnEnabled(
263262
AuthenticatorType.OAUTH_AUTHORIZATION_CODE));
264-
assertThrows(
265-
SFException.class,
263+
assertDoesNotThrow(
266264
() ->
267265
SessionUtil.checkIfExperimentalAuthnEnabled(
268266
AuthenticatorType.OAUTH_CLIENT_CREDENTIALS));

0 commit comments

Comments
 (0)