Add GitHub parameters in Manager (#2154)
This commit is contained in:
parent
fb29673fdf
commit
a5eadc49d3
|
@ -79,6 +79,9 @@ sub defaultValues {
|
||||||
'facebookUserField' => 'id',
|
'facebookUserField' => 'id',
|
||||||
'failedLoginNumber' => 5,
|
'failedLoginNumber' => 5,
|
||||||
'formTimeout' => 120,
|
'formTimeout' => 120,
|
||||||
|
'githubAuthnLevel' => 1,
|
||||||
|
'githubScope' => 'user:email',
|
||||||
|
'githubUserField' => 'login',
|
||||||
'globalLogoutRule' => 0,
|
'globalLogoutRule' => 0,
|
||||||
'globalLogoutTimer' => 1,
|
'globalLogoutTimer' => 1,
|
||||||
'globalStorage' => 'Apache::Session::File',
|
'globalStorage' => 'Apache::Session::File',
|
||||||
|
|
|
@ -45,7 +45,7 @@ our $authParameters = {
|
||||||
gpgParams => [qw(gpgAuthnLevel gpgDb)],
|
gpgParams => [qw(gpgAuthnLevel gpgDb)],
|
||||||
kerberosParams => [qw(krbAuthnLevel krbKeytab krbByJs krbRemoveDomain)],
|
kerberosParams => [qw(krbAuthnLevel krbKeytab krbByJs krbRemoveDomain)],
|
||||||
ldapParams => [qw(ldapAuthnLevel ldapExportedVars ldapServer ldapPort ldapBase managerDn managerPassword ldapTimeout ldapVersion ldapRaw LDAPFilter AuthLDAPFilter mailLDAPFilter ldapSearchDeref ldapGroupBase ldapGroupObjectClass ldapGroupAttributeName ldapGroupAttributeNameUser ldapGroupAttributeNameSearch ldapGroupDecodeSearchedValue ldapGroupRecursive ldapGroupAttributeNameGroup ldapPpolicyControl ldapSetPassword ldapChangePasswordAsUser ldapPwdEnc ldapUsePasswordResetAttribute ldapPasswordResetAttribute ldapPasswordResetAttributeValue ldapAllowResetExpiredPassword ldapITDS)],
|
ldapParams => [qw(ldapAuthnLevel ldapExportedVars ldapServer ldapPort ldapBase managerDn managerPassword ldapTimeout ldapVersion ldapRaw LDAPFilter AuthLDAPFilter mailLDAPFilter ldapSearchDeref ldapGroupBase ldapGroupObjectClass ldapGroupAttributeName ldapGroupAttributeNameUser ldapGroupAttributeNameSearch ldapGroupDecodeSearchedValue ldapGroupRecursive ldapGroupAttributeNameGroup ldapPpolicyControl ldapSetPassword ldapChangePasswordAsUser ldapPwdEnc ldapUsePasswordResetAttribute ldapPasswordResetAttribute ldapPasswordResetAttributeValue ldapAllowResetExpiredPassword ldapITDS)],
|
||||||
linkedinParams => [qw(linkedInAuthnLevel linkedInClientID linkedInClientSecret linkedInFields linkedInUserField linkedInScope)],
|
linkedinParams => [qw(githubAuthnLevel githubClientID githubClientSecret githubUserField githubScope)],
|
||||||
nullParams => [qw(nullAuthnLevel)],
|
nullParams => [qw(nullAuthnLevel)],
|
||||||
oidcParams => [qw(oidcAuthnLevel oidcRPCallbackGetParam oidcRPStateTimeout)],
|
oidcParams => [qw(oidcAuthnLevel oidcRPCallbackGetParam oidcRPStateTimeout)],
|
||||||
openidParams => [qw(openIdAuthnLevel openIdExportedVars openIdSecret openIdIDPList)],
|
openidParams => [qw(openIdAuthnLevel openIdExportedVars openIdSecret openIdIDPList)],
|
||||||
|
|
|
@ -314,6 +314,10 @@ sub attributes {
|
||||||
'k' => 'Facebook',
|
'k' => 'Facebook',
|
||||||
'v' => 'Facebook'
|
'v' => 'Facebook'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'k' => 'GitHub',
|
||||||
|
'v' => 'GitHub'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'k' => 'GPG',
|
'k' => 'GPG',
|
||||||
'v' => 'GPG'
|
'v' => 'GPG'
|
||||||
|
@ -509,6 +513,10 @@ sub attributes {
|
||||||
'k' => 'Facebook',
|
'k' => 'Facebook',
|
||||||
'v' => 'Facebook'
|
'v' => 'Facebook'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'k' => 'GitHub',
|
||||||
|
'v' => 'GitHub'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'k' => 'GPG',
|
'k' => 'GPG',
|
||||||
'v' => 'GPG'
|
'v' => 'GPG'
|
||||||
|
@ -891,6 +899,10 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
|
||||||
'k' => 'Facebook',
|
'k' => 'Facebook',
|
||||||
'v' => 'Facebook'
|
'v' => 'Facebook'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'k' => 'GitHub',
|
||||||
|
'v' => 'GitHub'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'k' => 'GPG',
|
'k' => 'GPG',
|
||||||
'v' => 'GPG'
|
'v' => 'GPG'
|
||||||
|
@ -1294,6 +1306,24 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
|
||||||
'default' => 120,
|
'default' => 120,
|
||||||
'type' => 'int'
|
'type' => 'int'
|
||||||
},
|
},
|
||||||
|
'githubAuthnLevel' => {
|
||||||
|
'default' => 1,
|
||||||
|
'type' => 'int'
|
||||||
|
},
|
||||||
|
'githubClientID' => {
|
||||||
|
'type' => 'text'
|
||||||
|
},
|
||||||
|
'githubClientSecret' => {
|
||||||
|
'type' => 'password'
|
||||||
|
},
|
||||||
|
'githubScope' => {
|
||||||
|
'default' => 'user:email',
|
||||||
|
'type' => 'text'
|
||||||
|
},
|
||||||
|
'githubUserField' => {
|
||||||
|
'default' => 'login',
|
||||||
|
'type' => 'text'
|
||||||
|
},
|
||||||
'globalLogoutCustomParam' => {
|
'globalLogoutCustomParam' => {
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,7 +25,8 @@ sub perlExpr {
|
||||||
$Lemonldap::NG::Common::Safelib::functions );
|
$Lemonldap::NG::Common::Safelib::functions );
|
||||||
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
||||||
my $err = join( '',
|
my $err = join( '',
|
||||||
grep { $_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? () : $_ } split( /\n/, $@ ) );
|
grep { $_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? () : $_ }
|
||||||
|
split( /\n/, $@ ) );
|
||||||
return $err ? ( -1, "__badExpression__: $err" ) : (1);
|
return $err ? ( -1, "__badExpression__: $err" ) : (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -801,19 +802,20 @@ sub attributes {
|
||||||
bruteForceProtectionMaxLockTime => {
|
bruteForceProtectionMaxLockTime => {
|
||||||
default => 900,
|
default => 900,
|
||||||
type => 'int',
|
type => 'int',
|
||||||
documentation =>
|
documentation => 'Brute force attack protection -> Max lock time',
|
||||||
'Brute force attack protection -> Max lock time',
|
|
||||||
},
|
},
|
||||||
bruteForceProtectionIncrementalTempo => {
|
bruteForceProtectionIncrementalTempo => {
|
||||||
default => 0,
|
default => 0,
|
||||||
help => 'bruteforceprotection.html',
|
help => 'bruteforceprotection.html',
|
||||||
type => 'bool',
|
type => 'bool',
|
||||||
documentation => 'Enable incremental lock time for brute force attack protection',
|
documentation =>
|
||||||
|
'Enable incremental lock time for brute force attack protection',
|
||||||
},
|
},
|
||||||
bruteForceProtectionLockTimes => {
|
bruteForceProtectionLockTimes => {
|
||||||
type => 'text',
|
type => 'text',
|
||||||
default => '5 15 60 300 600',
|
default => '5 15 60 300 600',
|
||||||
documentation => 'Incremental lock time values for brute force attack protection',
|
documentation =>
|
||||||
|
'Incremental lock time values for brute force attack protection',
|
||||||
},
|
},
|
||||||
grantSessionRules => {
|
grantSessionRules => {
|
||||||
type => 'grantContainer',
|
type => 'grantContainer',
|
||||||
|
@ -2902,6 +2904,7 @@ sub attributes {
|
||||||
{ k => 'AD', v => 'Active Directory' },
|
{ k => 'AD', v => 'Active Directory' },
|
||||||
{ k => 'DBI', v => 'Database (DBI)' },
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
{ k => 'Facebook', v => 'Facebook' },
|
{ k => 'Facebook', v => 'Facebook' },
|
||||||
|
{ k => 'GitHub', v => 'GitHub' },
|
||||||
{ k => 'GPG', v => 'GPG' },
|
{ k => 'GPG', v => 'GPG' },
|
||||||
{ k => 'Kerberos', v => 'Kerberos' },
|
{ k => 'Kerberos', v => 'Kerberos' },
|
||||||
{ k => 'LDAP', v => 'LDAP' },
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
@ -3417,6 +3420,17 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
||||||
linkedInScope =>
|
linkedInScope =>
|
||||||
{ type => 'text', default => 'r_liteprofile r_emailaddress' },
|
{ type => 'text', default => 'r_liteprofile r_emailaddress' },
|
||||||
|
|
||||||
|
# GitHub
|
||||||
|
githubAuthnLevel => {
|
||||||
|
type => 'int',
|
||||||
|
default => 1,
|
||||||
|
documentation => 'GitHub authentication level',
|
||||||
|
},
|
||||||
|
githubClientID => { type => 'text', },
|
||||||
|
githubClientSecret => { type => 'password', },
|
||||||
|
githubScope => { type => 'text', default => 'user:email' },
|
||||||
|
githubUserField => { type => 'text', default => 'login' },
|
||||||
|
|
||||||
# WebID
|
# WebID
|
||||||
webIDAuthnLevel => {
|
webIDAuthnLevel => {
|
||||||
type => 'int',
|
type => 'int',
|
||||||
|
@ -3563,6 +3577,7 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
||||||
{ k => 'DBI', v => 'Database (DBI)' },
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
{ k => 'Demo', v => 'Demo' },
|
{ k => 'Demo', v => 'Demo' },
|
||||||
{ k => 'Facebook', v => 'Facebook' },
|
{ k => 'Facebook', v => 'Facebook' },
|
||||||
|
{ k => 'GitHub', v => 'GitHub' },
|
||||||
{ k => 'GPG', v => 'GPG' },
|
{ k => 'GPG', v => 'GPG' },
|
||||||
{ k => 'Kerberos', v => 'Kerberos' },
|
{ k => 'Kerberos', v => 'Kerberos' },
|
||||||
{ k => 'LDAP', v => 'LDAP' },
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
@ -3631,6 +3646,7 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
||||||
{ k => 'AD', v => 'Active Directory' },
|
{ k => 'AD', v => 'Active Directory' },
|
||||||
{ k => 'DBI', v => 'Database (DBI)' },
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
{ k => 'Facebook', v => 'Facebook' },
|
{ k => 'Facebook', v => 'Facebook' },
|
||||||
|
{ k => 'GitHub', v => 'GitHub' },
|
||||||
{ k => 'GPG', v => 'GPG' },
|
{ k => 'GPG', v => 'GPG' },
|
||||||
{ k => 'Kerberos', v => 'Kerberos' },
|
{ k => 'Kerberos', v => 'Kerberos' },
|
||||||
{ k => 'LDAP', v => 'LDAP' },
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
|
|
@ -305,6 +305,16 @@ sub tree {
|
||||||
'linkedInUserField', 'linkedInScope'
|
'linkedInUserField', 'linkedInScope'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title => 'linkedinParams',
|
||||||
|
help => 'authlinkedin.html',
|
||||||
|
form => 'simpleInputContainer',
|
||||||
|
nodes => [
|
||||||
|
'githubAuthnLevel', 'githubClientID',
|
||||||
|
'githubClientSecret', 'githubUserField',
|
||||||
|
'githubScope'
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title => 'combinationParams',
|
title => 'combinationParams',
|
||||||
help => 'authcombination.html',
|
help => 'authcombination.html',
|
||||||
|
@ -708,8 +718,11 @@ sub tree {
|
||||||
title => 'globalLogout',
|
title => 'globalLogout',
|
||||||
help => 'globallogout.html',
|
help => 'globallogout.html',
|
||||||
form => 'simpleInputContainer',
|
form => 'simpleInputContainer',
|
||||||
nodes =>
|
nodes => [
|
||||||
[ 'globalLogoutRule', 'globalLogoutTimer','globalLogoutCustomParam' ],
|
'globalLogoutRule',
|
||||||
|
'globalLogoutTimer',
|
||||||
|
'globalLogoutCustomParam'
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title => 'stateCheck',
|
title => 'stateCheck',
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -316,6 +316,12 @@
|
||||||
"forms":"إستمارات",
|
"forms":"إستمارات",
|
||||||
"friendlyName":"اسم مألوف",
|
"friendlyName":"اسم مألوف",
|
||||||
"generalParameters":"المعاييرالعامة",
|
"generalParameters":"المعاييرالعامة",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"تفعيل",
|
"globalLogoutRule":"تفعيل",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Forms",
|
"forms":"Forms",
|
||||||
"friendlyName":"Friendly name",
|
"friendlyName":"Friendly name",
|
||||||
"generalParameters":"General Parameters",
|
"generalParameters":"General Parameters",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Activation",
|
"globalLogoutRule":"Activation",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Forms",
|
"forms":"Forms",
|
||||||
"friendlyName":"Friendly name",
|
"friendlyName":"Friendly name",
|
||||||
"generalParameters":"General Parameters",
|
"generalParameters":"General Parameters",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Activation",
|
"globalLogoutRule":"Activation",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Formulaires",
|
"forms":"Formulaires",
|
||||||
"friendlyName":"Nom alternatif",
|
"friendlyName":"Nom alternatif",
|
||||||
"generalParameters":"Paramètres généraux",
|
"generalParameters":"Paramètres généraux",
|
||||||
|
"githubAuthnLevel":"Niveau d'authentification",
|
||||||
|
"githubClientID":"Identifiant",
|
||||||
|
"githubClientSecret":"Mot de passe",
|
||||||
|
"githubParams":"Paramètres GitHub",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Champ contenant l'identifiant de l'utilisateur",
|
||||||
"globalLogout":"Déconnexion globale",
|
"globalLogout":"Déconnexion globale",
|
||||||
"globalLogoutCustomParam":"Paramètre personnalisé",
|
"globalLogoutCustomParam":"Paramètre personnalisé",
|
||||||
"globalLogoutRule":"Activation",
|
"globalLogoutRule":"Activation",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Moduli",
|
"forms":"Moduli",
|
||||||
"friendlyName":"Nome amichevole",
|
"friendlyName":"Nome amichevole",
|
||||||
"generalParameters":"Parametri generali",
|
"generalParameters":"Parametri generali",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Attivazione",
|
"globalLogoutRule":"Attivazione",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Formlar",
|
"forms":"Formlar",
|
||||||
"friendlyName":"Kolay ad",
|
"friendlyName":"Kolay ad",
|
||||||
"generalParameters":"Genel Parametreler",
|
"generalParameters":"Genel Parametreler",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global çıkış",
|
"globalLogout":"Global çıkış",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Aktivasyon",
|
"globalLogoutRule":"Aktivasyon",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Biểu mẫu",
|
"forms":"Biểu mẫu",
|
||||||
"friendlyName":"Tên thân thiện",
|
"friendlyName":"Tên thân thiện",
|
||||||
"generalParameters":"Thông số chung",
|
"generalParameters":"Thông số chung",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Activation",
|
"globalLogoutRule":"Activation",
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
"forms":"Forms",
|
"forms":"Forms",
|
||||||
"friendlyName":"Friendly name",
|
"friendlyName":"Friendly name",
|
||||||
"generalParameters":"通用参数",
|
"generalParameters":"通用参数",
|
||||||
|
"githubAuthnLevel":"Authentication level",
|
||||||
|
"githubClientID":"Client ID",
|
||||||
|
"githubClientSecret":"Client secret",
|
||||||
|
"githubParams":"GitHub Parameters",
|
||||||
|
"githubScope":"Scope",
|
||||||
|
"githubUserField":"Field containing user identifier",
|
||||||
"globalLogout":"Global logout",
|
"globalLogout":"Global logout",
|
||||||
"globalLogoutCustomParam":"Custom parameter",
|
"globalLogoutCustomParam":"Custom parameter",
|
||||||
"globalLogoutRule":"Activation",
|
"globalLogoutRule":"Activation",
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user