fusionauth_rust_client/models/
jwt.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.57.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Jwt : JSON Web Token (JWT) as defined by RFC 7519.  <pre>  From RFC 7519 Section 1. Introduction:     The suggested pronunciation of JWT is the same as the English word \"jot\".  <pre>  The JWT is not Thread-Safe and should not be re-used.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Jwt {
17    #[serde(rename = "aud", skip_serializing_if = "Option::is_none")]
18    pub aud: Option<serde_json::Value>,
19    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
20    #[serde(rename = "exp", skip_serializing_if = "Option::is_none")]
21    pub exp: Option<i64>,
22    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
23    #[serde(rename = "iat", skip_serializing_if = "Option::is_none")]
24    pub iat: Option<i64>,
25    #[serde(rename = "iss", skip_serializing_if = "Option::is_none")]
26    pub iss: Option<String>,
27    /// The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.
28    #[serde(rename = "nbf", skip_serializing_if = "Option::is_none")]
29    pub nbf: Option<i64>,
30    #[serde(rename = "otherClaims", skip_serializing_if = "Option::is_none")]
31    pub other_claims: Option<std::collections::HashMap<String, serde_json::Value>>,
32    #[serde(rename = "sub", skip_serializing_if = "Option::is_none")]
33    pub sub: Option<String>,
34    #[serde(rename = "jti", skip_serializing_if = "Option::is_none")]
35    pub jti: Option<String>,
36}
37
38impl Jwt {
39    /// JSON Web Token (JWT) as defined by RFC 7519.  <pre>  From RFC 7519 Section 1. Introduction:     The suggested pronunciation of JWT is the same as the English word \"jot\".  <pre>  The JWT is not Thread-Safe and should not be re-used.
40    pub fn new() -> Jwt {
41        Jwt {
42            aud: None,
43            exp: None,
44            iat: None,
45            iss: None,
46            nbf: None,
47            other_claims: None,
48            sub: None,
49            jti: None,
50        }
51    }
52}
53