1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-06 06:02:40 +03:00

Make the claims_imports optional in the config

This commit is contained in:
Quentin Gliech
2023-11-22 13:50:12 +01:00
parent e124a7a369
commit 20fa1d516e
2 changed files with 19 additions and 1 deletions

View File

@@ -300,6 +300,7 @@ pub struct Provider {
/// How claims should be imported from the `id_token` provided by the /// How claims should be imported from the `id_token` provided by the
/// provider /// provider
#[serde(default)]
pub claims_imports: ClaimsImports, pub claims_imports: ClaimsImports,
} }

View File

@@ -1751,7 +1751,6 @@
} }
], ],
"required": [ "required": [
"claims_imports",
"client_id", "client_id",
"id", "id",
"issuer", "issuer",
@@ -1769,6 +1768,24 @@
}, },
"claims_imports": { "claims_imports": {
"description": "How claims should be imported from the `id_token` provided by the provider", "description": "How claims should be imported from the `id_token` provided by the provider",
"default": {
"displayname": {
"action": "ignore",
"template": null
},
"email": {
"action": "ignore",
"set_email_verification": "import",
"template": null
},
"localpart": {
"action": "ignore",
"template": null
},
"subject": {
"template": null
}
},
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/ClaimsImports" "$ref": "#/definitions/ClaimsImports"