propelauth 0.23.3

A Rust crate for managing authentication and authorization with support for multi-tenant / B2B products, powered by PropelAuth
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateAccessTokenRequest {
    #[serde(rename = "user_id")]
    pub user_id: String,
    #[serde(rename = "duration_in_minutes")]
    pub duration_in_minutes: u64,
}

impl CreateAccessTokenRequest {
    pub fn new(user_id: String, duration_in_minutes: u64) -> CreateAccessTokenRequest {
        CreateAccessTokenRequest {
            user_id,
            duration_in_minutes,
        }
    }
}