Format project and run misc/update.sh
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use camino::Utf8PathBuf;
|
||||
use mas_iana::jose::JsonWebSignatureAlg;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize, de::Error};
|
||||
use serde_with::skip_serializing_none;
|
||||
use camino::Utf8PathBuf;
|
||||
use ulid::Ulid;
|
||||
use url::Url;
|
||||
|
||||
@@ -390,7 +390,7 @@ pub struct SignInWithApple {
|
||||
pub private_key_file: Option<Utf8PathBuf>,
|
||||
|
||||
/// The private key used to sign the `id_token`
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub private_key: Option<String>,
|
||||
|
||||
/// The Team ID of the Apple Developer Portal
|
||||
@@ -565,4 +565,4 @@ pub struct Provider {
|
||||
/// Specify `oidc` here.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub synapse_idp_id: Option<String>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,7 +294,8 @@ pub(crate) async fn handler(
|
||||
lazy_metadata.token_endpoint().await?,
|
||||
&keystore,
|
||||
&encrypter,
|
||||
).await?;
|
||||
)
|
||||
.await?;
|
||||
|
||||
let redirect_uri = url_builder.upstream_oauth_callback(provider.id);
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
use camino::Utf8PathBuf;
|
||||
use mas_data_model::{UpstreamOAuthProvider, UpstreamOAuthProviderTokenAuthMethod};
|
||||
use mas_iana::jose::JsonWebSignatureAlg;
|
||||
use mas_keystore::{DecryptError, Encrypter, Keystore};
|
||||
use mas_oidc_client::types::client_credentials::ClientCredentials;
|
||||
use pkcs8::DecodePrivateKey;
|
||||
use schemars::JsonSchema;
|
||||
use camino::Utf8PathBuf;
|
||||
use serde::Deserialize;
|
||||
use thiserror::Error;
|
||||
use url::Url;
|
||||
@@ -142,7 +142,8 @@ async fn client_credentials_for_provider(
|
||||
},
|
||||
|
||||
UpstreamOAuthProviderTokenAuthMethod::SignInWithApple => {
|
||||
let client_secret = client_secret.ok_or(ProviderCredentialsError::MissingClientSecret)?;
|
||||
let client_secret =
|
||||
client_secret.ok_or(ProviderCredentialsError::MissingClientSecret)?;
|
||||
|
||||
let params: SignInWithApple = serde_json::from_str(&client_secret)
|
||||
.map_err(|inner| ProviderCredentialsError::InvalidClientSecretJson { inner })?;
|
||||
|
||||
@@ -2156,50 +2156,28 @@
|
||||
},
|
||||
"SignInWithApple": {
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"key_id",
|
||||
"private_key_file",
|
||||
"team_id"
|
||||
],
|
||||
"properties": {
|
||||
"private_key_file": {
|
||||
"description": "The private key file used to sign the `id_token`",
|
||||
"type": "string"
|
||||
},
|
||||
"team_id": {
|
||||
"description": "The Team ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
},
|
||||
"key_id": {
|
||||
"description": "The key ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"required": [
|
||||
"key_id",
|
||||
"team_id"
|
||||
],
|
||||
"properties": {
|
||||
"private_key_file": {
|
||||
"description": "The private key file used to sign the `id_token`",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"key_id",
|
||||
"private_key",
|
||||
"team_id"
|
||||
],
|
||||
"properties": {
|
||||
"private_key": {
|
||||
"description": "The private key used to sign the `id_token`",
|
||||
"type": "string"
|
||||
},
|
||||
"team_id": {
|
||||
"description": "The Team ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
},
|
||||
"key_id": {
|
||||
"description": "The key ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"private_key": {
|
||||
"description": "The private key used to sign the `id_token`",
|
||||
"type": "string"
|
||||
},
|
||||
"team_id": {
|
||||
"description": "The Team ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
},
|
||||
"key_id": {
|
||||
"description": "The key ID of the Apple Developer Portal",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"DiscoveryMode": {
|
||||
"description": "How to discover the provider's configuration",
|
||||
@@ -2596,4 +2574,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user