open_api_hydra/models/previous_consent_session.rs
1/*
2 * ORY Hydra
3 *
4 * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PreviousConsentSession : The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PreviousConsentSession {
17 #[serde(rename = "consent_request", skip_serializing_if = "Option::is_none")]
18 pub consent_request: Option<crate::models::ConsentRequest>,
19 /// GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.
20 #[serde(rename = "grant_access_token_audience", skip_serializing_if = "Option::is_none")]
21 pub grant_access_token_audience: Option<Vec<String>>,
22 /// GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`
23 #[serde(rename = "grant_scope", skip_serializing_if = "Option::is_none")]
24 pub grant_scope: Option<Vec<String>>,
25 /// Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
26 #[serde(rename = "remember", skip_serializing_if = "Option::is_none")]
27 pub remember: Option<bool>,
28 /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.
29 #[serde(rename = "remember_for", skip_serializing_if = "Option::is_none")]
30 pub remember_for: Option<i64>,
31 #[serde(rename = "session", skip_serializing_if = "Option::is_none")]
32 pub session: Option<crate::models::ConsentRequestSession>,
33}
34
35impl PreviousConsentSession {
36 /// The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
37 pub fn new() -> PreviousConsentSession {
38 PreviousConsentSession {
39 consent_request: None,
40 grant_access_token_audience: None,
41 grant_scope: None,
42 remember: None,
43 remember_for: None,
44 session: None,
45 }
46 }
47}
48
49