Commit 6ee5509f authored by Xavier Guimard's avatar Xavier Guimard

Add registerUrl (fixes: #1325)

parent efb2fc23
......@@ -177,6 +177,7 @@ sub defaultValues {
'redirectFormMethod' => 'get',
'registerDB' => 'Null',
'registerTimeout' => 0,
'registerUrl' => 'http://auth.example.com/register.pl',
'remoteGlobalStorage' => 'Lemonldap::NG::Common::Apache::Session::SOAP',
'remoteGlobalStorageOptions' => {
'ns' =>
......
......@@ -8,12 +8,12 @@ sub types {
'authParamsText' => {
'test' => sub {
1;
}
}
},
'blackWhiteList' => {
'test' => sub {
1;
}
}
},
'bool' => {
'msgFail' => '__notABoolean__',
......@@ -36,17 +36,17 @@ sub types {
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'catAndAppList' => {
'test' => sub {
1;
}
}
},
'file' => {
'test' => sub {
1;
}
}
},
'hostname' => {
'form' => 'text',
......@@ -80,48 +80,48 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
if $_ =~ /exportedvars$/i and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'longtext' => {
'test' => sub {
1;
}
}
},
'menuApp' => {
'test' => sub {
1;
}
}
},
'menuCat' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajson' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajwks' => {
'test' => sub {
1;
}
}
},
'oidcOPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'oidcRPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'password' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'pcre' => {
'form' => 'text',
......@@ -132,7 +132,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
}
};
return $@ ? ( 0, "__badRegexp__: $@" ) : 1;
}
}
},
'PerlModule' => {
'form' => 'text',
......@@ -142,17 +142,17 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'portalskin' => {
'test' => sub {
1;
}
}
},
'portalskinbackground' => {
'test' => sub {
1;
}
}
},
'post' => {
'test' => sub {
1;
}
}
},
'RSAPrivateKey' => {
'test' => sub {
......@@ -160,7 +160,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:RSA\s+)PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKey' => {
'test' => sub {
......@@ -168,7 +168,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+=
m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+PUBLIC\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKeyOrCertificate' => {
'test' => sub {
......@@ -176,37 +176,37 @@ m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\
m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'rule' => {
'test' => sub {
1;
}
}
},
'samlAssertion' => {
'test' => sub {
1;
}
}
},
'samlAttribute' => {
'test' => sub {
1;
}
}
},
'samlIDPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'samlService' => {
'test' => sub {
1;
}
}
},
'samlSPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'select' => {
'test' => sub {
......@@ -216,19 +216,19 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\
return $test
? 1
: ( 1, "Invalid value '$_[0]' for this select" );
}
}
},
'subContainer' => {
'keyTest' => qr/\w/,
'test' => sub {
1;
}
}
},
'text' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'trool' => {
'msgFail' => '__authorizedValues__: -1, 0, 1',
......@@ -1036,7 +1036,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'keyTextContainer'
},
......@@ -1187,7 +1187,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
'type' => 'boolOrExpr'
},
'issuerDBGetActivation' => {
'default' => '0',
'default' => 0,
'type' => 'bool'
},
'issuerDBGetParameters' => {
......@@ -1208,7 +1208,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'type' => 'doubleHash'
},
......@@ -1225,7 +1225,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'bool'
},
'issuerDBOpenIDConnectActivation' => {
'default' => '0',
'default' => 0,
'type' => 'bool'
},
'issuerDBOpenIDConnectPath' => {
......@@ -1486,7 +1486,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'ruleContainer'
},
......@@ -1885,19 +1885,19 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
'type' => 'int'
},
'oidcServiceAllowAuthorizationCodeFlow' => {
'default' => '1',
'default' => 1,
'type' => 'bool'
},
'oidcServiceAllowDynamicRegistration' => {
'default' => '0',
'default' => 0,
'type' => 'bool'
},
'oidcServiceAllowHybridFlow' => {
'default' => '0',
'default' => 0,
'type' => 'bool'
},
'oidcServiceAllowImplicitFlow' => {
'default' => '0',
'default' => 0,
'type' => 'bool'
},
'oidcServiceKeyIdSig' => {
......@@ -2317,6 +2317,10 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
'default' => 0,
'type' => 'int'
},
'registerUrl' => {
'default' => 'http://auth.example.com/register.pl',
'type' => 'text'
},
'reloadUrls' => {
'keyTest' =>
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+))(?::\d+)?$/,
......
......@@ -831,7 +831,7 @@ sub attributes {
# OpenID-Connect issuer
issuerDBOpenIDConnectActivation => {
type => 'bool',
default => '0',
default => 0,
documentation => 'OpenID Connect server activation',
},
issuerDBOpenIDConnectPath => {
......@@ -848,7 +848,7 @@ sub attributes {
# GET issuer
issuerDBGetActivation => {
type => 'bool',
default => '0',
default => 0,
documentation => 'Get issuer activation',
},
issuerDBGetPath => {
......@@ -1000,6 +1000,11 @@ sub attributes {
type => 'int',
documentation => 'Register session timeout',
},
registerUrl => {
type => 'text',
default => 'http://auth.example.com/register.pl',
documentation => 'URL of register page',
},
# Upgrade session
upgradeSession => {
......@@ -2602,22 +2607,22 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
},
oidcServiceAllowDynamicRegistration => {
type => 'bool',
default => '0',
default => 0,
documentation => 'OpenID Connect allow dynamic client registration',
},
oidcServiceAllowAuthorizationCodeFlow => {
type => 'bool',
default => '1',
default => 1,
documentation => 'OpenID Connect allow authorization code flow',
},
oidcServiceAllowImplicitFlow => {
type => 'bool',
default => '0',
default => 0,
documentation => 'OpenID Connect allow implicit flow',
},
oidcServiceAllowHybridFlow => {
type => 'bool',
default => '0',
default => 0,
documentation => 'OpenID Connect allow hybrid flow',
},
oidcStorage => { type => 'PerlModule', },
......
......@@ -625,6 +625,7 @@ sub tree {
form => 'simpleInputContainer',
nodes => [
'registerDB',
'registerUrl',
'registerTimeout',
'registerConfirmSubject',
'registerDoneSubject'
......
......@@ -618,6 +618,7 @@
"registerDB": "الوحدات",
"registerDoneSubject": "عنوان البريد الذي تم القيام به",
"registerTimeout": "مدة صلاحية طلب التسجيل",
"registerUrl": "Page URL",
"reloadUrls": "إعادة تحميل الإعدادات",
"remoteCookieName": "اسم ملف تعريف الارتباط",
"remoteGlobalStorage": "وحدة الجلسات",
......
......@@ -569,8 +569,8 @@
"portalDisplayChangePassword": "Password change",
"portalDisplayLoginHistory": "Login History",
"portalDisplayLogout": "Logout",
"portalDisplayRegister": "Register new account",
"portalDisplayOidcConsents": "OIDC Consents",
"portalDisplayRegister": "Register new account",
"portalDisplayResetPassword": "Reset password",
"portalErrorOnExpiredSession": "Show error on expired session",
"portalErrorOnMailNotFound": "Show error on mail not found",
......@@ -618,6 +618,7 @@
"registerDB": "Module",
"registerDoneSubject": "Subject for done mail",
"registerTimeout": "Validity time of a register request",
"registerUrl": "Page URL",
"reloadUrls": "Configuration reload",
"remoteCookieName": "Cookie name",
"remoteGlobalStorage": "Sessions module",
......
......@@ -569,8 +569,8 @@
"portalDisplayChangePassword": "Changement de mot de passe",
"portalDisplayLoginHistory": "Historique des connexions",
"portalDisplayLogout": "Déconnexion",
"portalDisplayRegister": "Création d'un nouveau compte",
"portalDisplayOidcConsents": "Accords OIDC",
"portalDisplayRegister": "Création d'un nouveau compte",
"portalDisplayResetPassword": "Réinitialisation de mot de passe",
"portalErrorOnExpiredSession": "Affiche une erreur si la session est expirée",
"portalErrorOnMailNotFound": "Affiche une erreur si le mail n'est pas trouvé",
......@@ -618,6 +618,7 @@
"registerDB": "Module",
"registerDoneSubject": "Sujet du mail de prise en compte",
"registerTimeout": "Durée de validité de la requête",
"registerUrl": "URL de la page",
"reloadUrls": "Mise à jour de la configuration",
"remoteCookieName": "Nom du cookie",
"remoteGlobalStorage": "Module des sessions",
......
......@@ -569,8 +569,8 @@
"portalDisplayChangePassword": "Cambio password",
"portalDisplayLoginHistory": "Cronologia login",
"portalDisplayLogout": "Logout",
"portalDisplayRegister": "Registra nuovo account",
"portalDisplayOidcConsents": "OIDC Consents",
"portalDisplayRegister": "Registra nuovo account",
"portalDisplayResetPassword": "Reimposta password",
"portalErrorOnExpiredSession": "Mostra errore nella sessione scaduta",
"portalErrorOnMailNotFound": "Mostra errore sulla posta non trovata",
......@@ -618,6 +618,7 @@
"registerDB": "Modulo",
"registerDoneSubject": "Oggetto per la mail inviata",
"registerTimeout": "Tempo di validità di una richiesta di registrazione",
"registerUrl": "Page URL",
"reloadUrls": "Ricarica di configurazione",
"remoteCookieName": "Nome del cookie",
"remoteGlobalStorage": "Modulo di sessioni",
......
......@@ -569,8 +569,8 @@
"portalDisplayChangePassword": "Thay đổi mật khẩu",
"portalDisplayLoginHistory": "Lịch sử đăng nhập",
"portalDisplayLogout": "Đăng xuất",
"portalDisplayRegister": "Đăng ký tài khoản mới",
"portalDisplayOidcConsents": "OIDC Consents",
"portalDisplayRegister": "Đăng ký tài khoản mới",
"portalDisplayResetPassword": "Đặt lại mật khẩu",
"portalErrorOnExpiredSession": "Show error on expired session",
"portalErrorOnMailNotFound": "Show error on mail not found",
......@@ -618,6 +618,7 @@
"registerDB": "Mô đun",
"registerDoneSubject": "Tiêu đề cho thư đã hoàn tất",
"registerTimeout": "Thời hạn hiệu lực của yêu cầu đăng ký",
"registerUrl": "Page URL",
"reloadUrls": "Tải lại cấu hình",
"remoteCookieName": "Tên cookie",
"remoteGlobalStorage": "Mô-đun phiên",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment