azure_jwt 0.4.3

A simple JWT validator for Microsoft Azure Id tokens.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//use azure_jwt::*;
//use jsonwebtoken as jsw;
//
//const TOKEN: &str =
//    "a_valid_azure_token__Note_that_the_keys_will_expire_so_this_test_needs_fresh_tokens_to_run";

// Thos integration test is supposed to be run when you want to test against a valid azure token.
// TODO: See if we can redirect this test to microsioft demo/test api.
//#[test]
// fn decode_token() {
//     let mut az_auth = AzureAuth::new("an_active_client_id").unwrap();
//     let header: jsw::TokenData<AzureJwtClaims> = jsw::dangerous_unsafe_decode(TOKEN).unwrap();
//     println!("{:?}", header);
//     az_auth.validate_token(TOKEN).unwrap();
// }