/*
* SpatioAPI
*
* The REST API that owns every resource in your Spatio workspace: notes, sheets, slides, tasks, calendar events, mail, chat, files, and contacts. SpatioMCP wraps this API; Spatio Desktop reads from it. You can call it directly from your own code. All requests must be authenticated with a Personal Access Token (`Authorization: Bearer pat_...`) or an OAuth 2.1 access token, and use HTTPS. Official SDKs (MIT, generated from this spec on every release): - TypeScript: https://github.com/spatio-labs/spatio-ts (`npm install @spatio-labs/spatio-ts`) - Python: https://github.com/spatio-labs/spatio-py (`pip install spatio-sdk`) - Go: https://github.com/spatio-labs/spatio-go (`go get github.com/spatio-labs/spatio-go`) This specification is generated from the platform-service Go source on every push to `main`. The spec, not hand-written documentation, is the source of truth: server stubs and SDKs are generated from it, and any drift between the spec and the running service fails CI.
*
* The version of the OpenAPI document: v1
* Contact: hello@spatio.app
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// DiscoveryDocument : OAuth 2.1 (RFC 8414) + OpenID Connect Discovery 1.0 metadata. Same payload returned from both well-known paths.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DiscoveryDocument {
#[serde(rename = "issuer")]
pub issuer: String,
#[serde(rename = "authorization_endpoint")]
pub authorization_endpoint: String,
#[serde(rename = "token_endpoint")]
pub token_endpoint: String,
#[serde(rename = "registration_endpoint", skip_serializing_if = "Option::is_none")]
pub registration_endpoint: Option<String>,
#[serde(rename = "introspection_endpoint", skip_serializing_if = "Option::is_none")]
pub introspection_endpoint: Option<String>,
#[serde(rename = "revocation_endpoint", skip_serializing_if = "Option::is_none")]
pub revocation_endpoint: Option<String>,
#[serde(rename = "userinfo_endpoint", skip_serializing_if = "Option::is_none")]
pub userinfo_endpoint: Option<String>,
#[serde(rename = "jwks_uri")]
pub jwks_uri: String,
#[serde(rename = "response_types_supported", skip_serializing_if = "Option::is_none")]
pub response_types_supported: Option<Vec<String>>,
#[serde(rename = "grant_types_supported", skip_serializing_if = "Option::is_none")]
pub grant_types_supported: Option<Vec<String>>,
#[serde(rename = "token_endpoint_auth_methods_supported", skip_serializing_if = "Option::is_none")]
pub token_endpoint_auth_methods_supported: Option<Vec<String>>,
#[serde(rename = "code_challenge_methods_supported", skip_serializing_if = "Option::is_none")]
pub code_challenge_methods_supported: Option<Vec<String>>,
#[serde(rename = "scopes_supported")]
pub scopes_supported: Vec<String>,
#[serde(rename = "subject_types_supported", skip_serializing_if = "Option::is_none")]
pub subject_types_supported: Option<Vec<String>>,
#[serde(rename = "id_token_signing_alg_values_supported", skip_serializing_if = "Option::is_none")]
pub id_token_signing_alg_values_supported: Option<Vec<String>>,
#[serde(rename = "prompt_values_supported", skip_serializing_if = "Option::is_none")]
pub prompt_values_supported: Option<Vec<String>>,
#[serde(rename = "claims_supported", skip_serializing_if = "Option::is_none")]
pub claims_supported: Option<Vec<String>>,
#[serde(rename = "service_documentation", skip_serializing_if = "Option::is_none")]
pub service_documentation: Option<String>,
}
impl DiscoveryDocument {
/// OAuth 2.1 (RFC 8414) + OpenID Connect Discovery 1.0 metadata. Same payload returned from both well-known paths.
pub fn new(issuer: String, authorization_endpoint: String, token_endpoint: String, jwks_uri: String, scopes_supported: Vec<String>) -> DiscoveryDocument {
DiscoveryDocument {
issuer,
authorization_endpoint,
token_endpoint,
registration_endpoint: None,
introspection_endpoint: None,
revocation_endpoint: None,
userinfo_endpoint: None,
jwks_uri,
response_types_supported: None,
grant_types_supported: None,
token_endpoint_auth_methods_supported: None,
code_challenge_methods_supported: None,
scopes_supported,
subject_types_supported: None,
id_token_signing_alg_values_supported: None,
prompt_values_supported: None,
claims_supported: None,
service_documentation: None,
}
}
}