Add default attributes for an OP (#892)

This commit is contained in:
Clément Oudot 2016-01-21 17:17:43 +00:00
parent 1216ca679f
commit ee105c4ead
5 changed files with 53 additions and 7 deletions

View File

@ -132,11 +132,17 @@ sub defaultValues {
'notificationStorageOptions' => {
'dirName' => '/var/lib/lemonldap-ng/notifications'
},
'notificationWildcard' => 'allusers',
'notifyDeleted' => 1,
'notifyOther' => 0,
'nullAuthnLevel' => 2,
'oidcAuthnLevel' => 1,
'notificationWildcard' => 'allusers',
'notifyDeleted' => 1,
'notifyOther' => 0,
'nullAuthnLevel' => 2,
'oidcAuthnLevel' => 1,
'oidcOPMetaDataExportedVars' => {
'cn' => 'name',
'mail' => 'email',
'sn' => 'family_name',
'uid' => 'sub'
},
'oidcOPMetaDataOptionsCheckJWTSignature' => 1,
'oidcOPMetaDataOptionsDisplay' => '',
'oidcOPMetaDataOptionsIDTokenMaxAge' => 30,

View File

@ -1184,6 +1184,12 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'int'
},
'oidcOPMetaDataExportedVars' => {
'default' => {
'cn' => 'name',
'mail' => 'email',
'sn' => 'family_name',
'uid' => 'sub'
},
'type' => 'keyTextContainer'
},
'oidcOPMetaDataJSON' => {

View File

@ -2156,7 +2156,15 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
# OpenID Connect providers
oidcOPMetaDataJSON => { type => 'file', },
oidcOPMetaDataJWKS => { type => 'file', },
oidcOPMetaDataExportedVars => { type => 'keyTextContainer', },
oidcOPMetaDataExportedVars => {
type => 'keyTextContainer',
default => {
'cn' => 'name',
'sn' => 'family_name',
'mail' => 'email',
'uid' => 'sub'
}
},
oidcOPMetaDataOptionsConfigurationURI => { type => 'url', },
oidcOPMetaDataOptionsJWKSTimeout => { type => 'int', default => 0 },
oidcOPMetaDataOptionsClientID => { type => 'text', },

View File

@ -24,6 +24,32 @@ function templates(tpl,key) {
},
{
"cnodes" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars",
"default" : [
{
"data" : "name",
"id" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars/cn",
"title" : "cn",
"type" : "keyText"
},
{
"data" : "email",
"id" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars/mail",
"title" : "mail",
"type" : "keyText"
},
{
"data" : "family_name",
"id" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars/sn",
"title" : "sn",
"type" : "keyText"
},
{
"data" : "sub",
"id" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars/uid",
"title" : "uid",
"type" : "keyText"
}
],
"id" : tpl+"s/"+key+"/"+"oidcOPMetaDataExportedVars",
"title" : "oidcOPMetaDataExportedVars",
"type" : "keyTextContainer"

File diff suppressed because one or more lines are too long