ory_client/models/oidc_configuration.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.7
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OidcConfiguration : Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OidcConfiguration {
17 /// OAuth 2.0 Authorization Endpoint URL
18 #[serde(rename = "authorization_endpoint")]
19 pub authorization_endpoint: String,
20 /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
21 #[serde(rename = "backchannel_logout_session_supported", skip_serializing_if = "Option::is_none")]
22 pub backchannel_logout_session_supported: Option<bool>,
23 /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.
24 #[serde(rename = "backchannel_logout_supported", skip_serializing_if = "Option::is_none")]
25 pub backchannel_logout_supported: Option<bool>,
26 /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.
27 #[serde(rename = "claims_parameter_supported", skip_serializing_if = "Option::is_none")]
28 pub claims_parameter_supported: Option<bool>,
29 /// OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.
30 #[serde(rename = "claims_supported", skip_serializing_if = "Option::is_none")]
31 pub claims_supported: Option<Vec<String>>,
32 /// OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.
33 #[serde(rename = "code_challenge_methods_supported", skip_serializing_if = "Option::is_none")]
34 pub code_challenge_methods_supported: Option<Vec<String>>,
35 /// OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.
36 #[serde(rename = "credentials_endpoint_draft_00", skip_serializing_if = "Option::is_none")]
37 pub credentials_endpoint_draft_00: Option<String>,
38 /// OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.
39 #[serde(rename = "credentials_supported_draft_00", skip_serializing_if = "Option::is_none")]
40 pub credentials_supported_draft_00: Option<Vec<models::CredentialSupportedDraft00>>,
41 /// OAuth 2.0 Device Authorization Endpoint URL
42 #[serde(rename = "device_authorization_endpoint")]
43 pub device_authorization_endpoint: String,
44 /// OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.
45 #[serde(rename = "end_session_endpoint", skip_serializing_if = "Option::is_none")]
46 pub end_session_endpoint: Option<String>,
47 /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.
48 #[serde(rename = "frontchannel_logout_session_supported", skip_serializing_if = "Option::is_none")]
49 pub frontchannel_logout_session_supported: Option<bool>,
50 /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.
51 #[serde(rename = "frontchannel_logout_supported", skip_serializing_if = "Option::is_none")]
52 pub frontchannel_logout_supported: Option<bool>,
53 /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.
54 #[serde(rename = "grant_types_supported", skip_serializing_if = "Option::is_none")]
55 pub grant_types_supported: Option<Vec<String>>,
56 /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens.
57 #[serde(rename = "id_token_signed_response_alg")]
58 pub id_token_signed_response_alg: Vec<String>,
59 /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.
60 #[serde(rename = "id_token_signing_alg_values_supported")]
61 pub id_token_signing_alg_values_supported: Vec<String>,
62 /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
63 #[serde(rename = "issuer")]
64 pub issuer: String,
65 /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
66 #[serde(rename = "jwks_uri")]
67 pub jwks_uri: String,
68 /// OpenID Connect Dynamic Client Registration Endpoint URL
69 #[serde(rename = "registration_endpoint", skip_serializing_if = "Option::is_none")]
70 pub registration_endpoint: Option<String>,
71 /// OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).
72 #[serde(rename = "request_object_signing_alg_values_supported", skip_serializing_if = "Option::is_none")]
73 pub request_object_signing_alg_values_supported: Option<Vec<String>>,
74 /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.
75 #[serde(rename = "request_parameter_supported", skip_serializing_if = "Option::is_none")]
76 pub request_parameter_supported: Option<bool>,
77 /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.
78 #[serde(rename = "request_uri_parameter_supported", skip_serializing_if = "Option::is_none")]
79 pub request_uri_parameter_supported: Option<bool>,
80 /// OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.
81 #[serde(rename = "require_request_uri_registration", skip_serializing_if = "Option::is_none")]
82 pub require_request_uri_registration: Option<bool>,
83 /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.
84 #[serde(rename = "response_modes_supported", skip_serializing_if = "Option::is_none")]
85 pub response_modes_supported: Option<Vec<String>>,
86 /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.
87 #[serde(rename = "response_types_supported")]
88 pub response_types_supported: Vec<String>,
89 /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.
90 #[serde(rename = "revocation_endpoint", skip_serializing_if = "Option::is_none")]
91 pub revocation_endpoint: Option<String>,
92 /// OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used
93 #[serde(rename = "scopes_supported", skip_serializing_if = "Option::is_none")]
94 pub scopes_supported: Option<Vec<String>>,
95 /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
96 #[serde(rename = "subject_types_supported")]
97 pub subject_types_supported: Vec<String>,
98 /// OAuth 2.0 Token Endpoint URL
99 #[serde(rename = "token_endpoint")]
100 pub token_endpoint: String,
101 /// OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0
102 #[serde(rename = "token_endpoint_auth_methods_supported", skip_serializing_if = "Option::is_none")]
103 pub token_endpoint_auth_methods_supported: Option<Vec<String>>,
104 /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.
105 #[serde(rename = "userinfo_endpoint", skip_serializing_if = "Option::is_none")]
106 pub userinfo_endpoint: Option<String>,
107 /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses.
108 #[serde(rename = "userinfo_signed_response_alg")]
109 pub userinfo_signed_response_alg: Vec<String>,
110 /// OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
111 #[serde(rename = "userinfo_signing_alg_values_supported", skip_serializing_if = "Option::is_none")]
112 pub userinfo_signing_alg_values_supported: Option<Vec<String>>,
113}
114
115impl OidcConfiguration {
116 /// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others.
117 pub fn new(authorization_endpoint: String, device_authorization_endpoint: String, id_token_signed_response_alg: Vec<String>, id_token_signing_alg_values_supported: Vec<String>, issuer: String, jwks_uri: String, response_types_supported: Vec<String>, subject_types_supported: Vec<String>, token_endpoint: String, userinfo_signed_response_alg: Vec<String>) -> OidcConfiguration {
118 OidcConfiguration {
119 authorization_endpoint,
120 backchannel_logout_session_supported: None,
121 backchannel_logout_supported: None,
122 claims_parameter_supported: None,
123 claims_supported: None,
124 code_challenge_methods_supported: None,
125 credentials_endpoint_draft_00: None,
126 credentials_supported_draft_00: None,
127 device_authorization_endpoint,
128 end_session_endpoint: None,
129 frontchannel_logout_session_supported: None,
130 frontchannel_logout_supported: None,
131 grant_types_supported: None,
132 id_token_signed_response_alg,
133 id_token_signing_alg_values_supported,
134 issuer,
135 jwks_uri,
136 registration_endpoint: None,
137 request_object_signing_alg_values_supported: None,
138 request_parameter_supported: None,
139 request_uri_parameter_supported: None,
140 require_request_uri_registration: None,
141 response_modes_supported: None,
142 response_types_supported,
143 revocation_endpoint: None,
144 scopes_supported: None,
145 subject_types_supported,
146 token_endpoint,
147 token_endpoint_auth_methods_supported: None,
148 userinfo_endpoint: None,
149 userinfo_signed_response_alg,
150 userinfo_signing_alg_values_supported: None,
151 }
152 }
153}
154