Skip to content

Commit 95cfdfb

Browse files
authored
Set expected audience to validation in auth0 example (#349)
1 parent 5ae24bb commit 95cfdfb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/auth0.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2727
Algorithm::from_str(j.common.key_algorithm.unwrap().to_string().as_str())
2828
.unwrap(),
2929
);
30+
validation.set_audience(&["https://dev-duzyayk4.eu.auth0.com/api/v2/"]);
3031
validation.validate_exp = false;
3132
let decoded_token =
3233
decode::<HashMap<String, serde_json::Value>>(TOKEN, &decoding_key, &validation)

0 commit comments

Comments
 (0)