beteran-server-service/src/compositions/identity/models.rs

20 lines
680 B
Rust
Raw Normal View History

2022-08-08 07:19:22 +00:00
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,
2022-08-08 10:10:34 +00:00
pub iat: i64,
pub exp: i64,
2022-08-08 07:19:22 +00:00
pub session_id: String,
}