Skip to content

Commit

Permalink
Fix Frank JWT decode
Browse files Browse the repository at this point in the history
The function decode has changed to Frank_jwt and needs 4 parameters
  • Loading branch information
lunicorn-x64 authored and TatriX committed Dec 3, 2019
1 parent bc048cf commit 422f33b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn extract_token_from_header(header: &str) -> Option<&str> {
/// Decode token into `Auth` struct. If any error is encountered, log it
/// an return None.
fn decode_token(token: &str) -> Option<Auth> {
jwt::decode(token, &config::SECRET.to_string(), jwt::Algorithm::HS256)
jwt::decode(token, &config::SECRET.to_string(), jwt::Algorithm::HS256, &jwt::ValidationOptions::default())
.map(|(_, payload)| {
serde_json::from_value::<Auth>(payload)
.map_err(|err| {
Expand Down

0 comments on commit 422f33b

Please sign in to comment.