20 lines
680 B
Rust
20 lines
680 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
// #[derive(Debug, Serialize, Deserialize)]
|
|
// struct Claims {
|
|
// aud: String, // Optional. Audience
|
|
// exp: usize, // Required (validate_exp defaults to true in validation). Expiration time (as UTC timestamp)
|
|
// iat: usize, // Optional. Issued at (as UTC timestamp)
|
|
// iss: String, // Optional. Issuer
|
|
// nbf: usize, // Optional. Not Before (as UTC timestamp)
|
|
// sub: String, // Optional. Subject (whom token refers to)
|
|
// }
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct Claims {
|
|
pub iss: String,
|
|
pub iat: i64,
|
|
pub exp: i64,
|
|
pub session_id: String,
|
|
}
|