open_api_hydra/models/
consent_request.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
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConsentRequest {
16    /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
17    #[serde(rename = "acr", skip_serializing_if = "Option::is_none")]
18    pub acr: Option<String>,
19    /// Challenge is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session.
20    #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")]
21    pub challenge: Option<String>,
22    #[serde(rename = "client", skip_serializing_if = "Option::is_none")]
23    pub client: Option<crate::models::OAuth2Client>,
24    /// Context contains arbitrary information set by the login endpoint or is empty if not set.
25    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
26    pub context: Option<::std::collections::HashMap<String, serde_json::Value>>,
27    /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.
28    #[serde(rename = "login_challenge", skip_serializing_if = "Option::is_none")]
29    pub login_challenge: Option<String>,
30    /// LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.
31    #[serde(rename = "login_session_id", skip_serializing_if = "Option::is_none")]
32    pub login_session_id: Option<String>,
33    #[serde(rename = "oidc_context", skip_serializing_if = "Option::is_none")]
34    pub oidc_context: Option<crate::models::OpenIdConnectContext>,
35    /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.
36    #[serde(rename = "request_url", skip_serializing_if = "Option::is_none")]
37    pub request_url: Option<String>,
38    /// RequestedScope contains the access token audience as requested by the OAuth 2.0 Client.
39    #[serde(rename = "requested_access_token_audience", skip_serializing_if = "Option::is_none")]
40    pub requested_access_token_audience: Option<Vec<String>>,
41    /// RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
42    #[serde(rename = "requested_scope", skip_serializing_if = "Option::is_none")]
43    pub requested_scope: Option<Vec<String>>,
44    /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.
45    #[serde(rename = "skip", skip_serializing_if = "Option::is_none")]
46    pub skip: Option<bool>,
47    /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.
48    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
49    pub subject: Option<String>,
50}
51
52impl ConsentRequest {
53    pub fn new() -> ConsentRequest {
54        ConsentRequest {
55            acr: None,
56            challenge: None,
57            client: None,
58            context: None,
59            login_challenge: None,
60            login_session_id: None,
61            oidc_context: None,
62            request_url: None,
63            requested_access_token_audience: None,
64            requested_scope: None,
65            skip: None,
66            subject: None,
67        }
68    }
69}
70
71