systemprompt_models/profile/
security.rs1use crate::auth::JwtAudience;
2use serde::{Deserialize, Serialize};
3
4const fn default_allow_registration() -> bool {
5 true
6}
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct SecurityConfig {
10 #[serde(rename = "jwt_issuer")]
11 pub issuer: String,
12
13 #[serde(rename = "jwt_access_token_expiration")]
17 pub access_token_expiration: i64,
18
19 #[serde(rename = "jwt_refresh_token_expiration")]
22 pub refresh_token_expiration: i64,
23
24 #[serde(rename = "jwt_audiences")]
25 pub audiences: Vec<JwtAudience>,
26
27 #[serde(default = "default_allow_registration")]
28 pub allow_registration: bool,
29}