authentik_client/models/
agent_token_response.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AgentTokenResponse {
17 #[serde(rename = "token")]
18 pub token: String,
19 #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
20 pub expires_in: Option<i32>,
21}
22
23impl AgentTokenResponse {
24 pub fn new(token: String) -> AgentTokenResponse {
26 AgentTokenResponse {
27 token,
28 expires_in: None,
29 }
30 }
31}