#access-token #google-cloud #access #service-account #token #gcp #server

bin+lib gcp_access_token

this is a pure rust implimentation to get google cloud access token for servers with service account credentials

4 releases

0.1.3 Oct 3, 2023
0.1.2 Oct 3, 2023
0.1.1 Dec 29, 2021
0.1.0 Dec 29, 2021

#471 in Asynchronous


Used in fast_firestore

GPL-3.0 license

13KB
226 lines

gcp_access_token - rust

this is a pure rust implimentation to get google cloud access token for servers with service account credentials.

use gcp_access_token;

#[tokio::main]
async fn main() {

    match gcp_access_token::generator::init("./credentials.json".to_string()).await{
        Ok(v)=>{
            println!("token successfull : {}",v);
        },
        Err(_e)=>{
            println!("!!! failed-token : {:?}",_e);
        }
    }

}


lib.rs:

this is a pure rust implimentation to get google cloud access token for servers with service account credentials.

use gcp_access_token;

#[tokio::main]
async fn main() {

    match gcp_access_token::generator::init("./credentials.json".to_string()).await{
        Ok(v)=>{
            println!("token successfull : {}",v);
        },
        Err(_e)=>{
            println!("!!! failed-token : {:?}",_e);
        }
    }

}

Dependencies

~8–22MB
~335K SLoC