ory_client/models/o_auth2_consent_session.rs
1/*
2 * Ory APIs
3 *
4 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
5 *
6 * The version of the OpenAPI document: v1.22.21
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OAuth2ConsentSession : A completed OAuth 2.0 Consent Session.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OAuth2ConsentSession {
17 #[serde(rename = "consent_request", skip_serializing_if = "Option::is_none")]
18 pub consent_request: Option<Box<models::OAuth2ConsentRequest>>,
19 /// ConsentRequestID is the identifier of the consent request that initiated this consent session.
20 #[serde(rename = "consent_request_id", skip_serializing_if = "Option::is_none")]
21 pub consent_request_id: Option<String>,
22 #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
23 pub context: Option<serde_json::Value>,
24 #[serde(rename = "grant_access_token_audience", skip_serializing_if = "Option::is_none")]
25 pub grant_access_token_audience: Option<Vec<String>>,
26 #[serde(rename = "grant_scope", skip_serializing_if = "Option::is_none")]
27 pub grant_scope: Option<Vec<String>>,
28 #[serde(rename = "handled_at", skip_serializing_if = "Option::is_none")]
29 pub handled_at: Option<String>,
30 /// Remember Consent 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.
31 #[serde(rename = "remember", skip_serializing_if = "Option::is_none")]
32 pub remember: Option<bool>,
33 /// Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.
34 #[serde(rename = "remember_for", skip_serializing_if = "Option::is_none")]
35 pub remember_for: Option<i64>,
36 #[serde(rename = "session", skip_serializing_if = "Option::is_none")]
37 pub session: Option<Box<models::AcceptOAuth2ConsentRequestSession>>,
38}
39
40impl OAuth2ConsentSession {
41 /// A completed OAuth 2.0 Consent Session.
42 pub fn new() -> OAuth2ConsentSession {
43 OAuth2ConsentSession {
44 consent_request: None,
45 consent_request_id: None,
46 context: None,
47 grant_access_token_audience: None,
48 grant_scope: None,
49 handled_at: None,
50 remember: None,
51 remember_for: None,
52 session: None,
53 }
54 }
55}
56