Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 20fa1d5

Browse files
committed
Make the claims_imports optional in the config
1 parent e124a7a commit 20fa1d5

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

crates/config/src/sections/upstream_oauth2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ pub struct Provider {
300300

301301
/// How claims should be imported from the `id_token` provided by the
302302
/// provider
303+
#[serde(default)]
303304
pub claims_imports: ClaimsImports,
304305
}
305306

docs/config.schema.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,6 @@
17511751
}
17521752
],
17531753
"required": [
1754-
"claims_imports",
17551754
"client_id",
17561755
"id",
17571756
"issuer",
@@ -1769,6 +1768,24 @@
17691768
},
17701769
"claims_imports": {
17711770
"description": "How claims should be imported from the `id_token` provided by the provider",
1771+
"default": {
1772+
"displayname": {
1773+
"action": "ignore",
1774+
"template": null
1775+
},
1776+
"email": {
1777+
"action": "ignore",
1778+
"set_email_verification": "import",
1779+
"template": null
1780+
},
1781+
"localpart": {
1782+
"action": "ignore",
1783+
"template": null
1784+
},
1785+
"subject": {
1786+
"template": null
1787+
}
1788+
},
17721789
"allOf": [
17731790
{
17741791
"$ref": "#/definitions/ClaimsImports"

0 commit comments

Comments
 (0)