Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
blckngm committed Aug 21, 2023
1 parent 5681f56 commit 595697d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#![doc = include_str!("../README.md")]

use openssl::error::ErrorStack;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::{Map, Value};
use serde_with::{serde_as, skip_serializing_none};
use smallvec::SmallVec;
use std::{
borrow::Cow,
fmt,
io::Write,
string::FromUtf8Error,
time::{Duration, SystemTime, UNIX_EPOCH},
};
use openssl::error::ErrorStack;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::{Map, Value};
use serde_with::{serde_as, skip_serializing_none};
use smallvec::SmallVec;

use jwk::Jwk;
pub use some::*;
Expand Down Expand Up @@ -198,9 +198,9 @@ impl<ExtraClaims> HeaderAndClaims<ExtraClaims> {

/// Check that `iat` is present and is later than `t`.
pub fn iat_is_later_than(&self, t: SystemTime) -> bool {
self.claims.iat.map_or(false, |iat| {
iat > t.duration_since(UNIX_EPOCH).unwrap()
})
self.claims
.iat
.map_or(false, |iat| iat > t.duration_since(UNIX_EPOCH).unwrap())
}

/// Set token expiration time (`exp`) to some time after the current time,
Expand Down

0 comments on commit 595697d

Please sign in to comment.