Skip to content

Commit

Permalink
Set expected audience to validation in auth0 example (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Dec 7, 2023
1 parent 5ae24bb commit 95cfdfb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/auth0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Algorithm::from_str(j.common.key_algorithm.unwrap().to_string().as_str())
.unwrap(),
);
validation.set_audience(&["https://dev-duzyayk4.eu.auth0.com/api/v2/"]);
validation.validate_exp = false;
let decoded_token =
decode::<HashMap<String, serde_json::Value>>(TOKEN, &decoding_key, &validation)
Expand Down

0 comments on commit 95cfdfb

Please sign in to comment.