parent
30571cafd2
commit
2c9c57fc4b
|
@ -24,4 +24,4 @@ pub use decoding::{
|
|||
};
|
||||
pub use encoding::{encode, EncodingKey};
|
||||
pub use header::Header;
|
||||
pub use validation::Validation;
|
||||
pub use validation::{get_current_timestamp, Validation};
|
||||
|
|
|
@ -97,7 +97,8 @@ impl Default for Validation {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_current_timestamp() -> u64 {
|
||||
/// Gets the current timestamp in the format JWT expect
|
||||
pub fn get_current_timestamp() -> u64 {
|
||||
let start = SystemTime::now();
|
||||
start.duration_since(UNIX_EPOCH).expect("Time went backwards").as_secs()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue