snowflake-jwt

Generates JWT token in Snowflake-compatible format, see Using Key Pair Authentication.

Can be used in order to run queries against SQL REST API.

Usage

toml [dependencies] snowflake-jwt = "0.1.0"

Check examples for working programs using the library.

```rust use anyhow; use fs; use snowflake_jwt;

fn gettoken(privatekeypath: &str, accountidentifier: &str, username: &str) -> Result { let pem = fs::read(privatekeypath)?; let fullidentifier = format!("{}.{}", accountidentifier, username); let jwt = snowflakejwt::generatejwttoken(&pem, &fullidentifier)?;

Ok(jwt)

} ```