From 696c6d202cd6fca47bd21230cabcdebeda5c2117 Mon Sep 17 00:00:00 2001 From: Daktic Date: Mon, 22 May 2023 14:46:22 -0400 Subject: [PATCH] Added string replace line to fix implementation error. --- snowflake-connector/src/jwt.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/snowflake-connector/src/jwt.rs b/snowflake-connector/src/jwt.rs index cadfb7b..d7ceb3c 100644 --- a/snowflake-connector/src/jwt.rs +++ b/snowflake-connector/src/jwt.rs @@ -17,6 +17,7 @@ pub fn create_token>( for _ in 0..padding { public_key_fingerprint.push('='); } + let public_key_fingerprint = public_key_fingerprint.replace('_',"/"); //Snowflake expects "/" and not "_" let qualified_username = format!("{account_identifier}.{user}"); let issuer = format!("{qualified_username}.SHA256:{public_key_fingerprint}"); let claims = Claims::create(Duration::from_hours(1))