diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm index 804add530..456135c54 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm @@ -706,10 +706,11 @@ sub sfExtra { my $res = []; foreach my $mod ( keys %$val ) { my $tmp; - $tmp->{title} = $mod; - $tmp->{id} = "sfExtra/$mod"; - $tmp->{type} = 'sfExtra'; - $tmp->{data}->{$_} = $val->{$mod}->{$_} foreach (qw(type rule)); + $tmp->{title} = $mod; + $tmp->{id} = "sfExtra/$mod"; + $tmp->{type} = 'sfExtra'; + $tmp->{data}->{$_} = $val->{$mod}->{$_} + foreach (qw(type rule logo label)); my $over = $val->{$mod}->{over} // {}; $tmp->{data}->{over} = [ map { [ $_, $over->{$_} ] } keys %$over ]; push @$res, $tmp; diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm index c929f022f..e13dc86c6 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm @@ -1142,6 +1142,9 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][ 'default' => '\\d{6}', 'type' => 'pcre' }, + 'ext2fLabel' => { + 'type' => 'text' + }, 'ext2fLogo' => { 'type' => 'text' }, @@ -1647,6 +1650,9 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][ 'default' => '\\d{6}', 'type' => 'pcre' }, + 'mail2fLabel' => { + 'type' => 'text' + }, 'mail2fLogo' => { 'type' => 'text' }, @@ -2530,6 +2536,9 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] 'rest2fInitUrl' => { 'type' => 'url' }, + 'rest2fLabel' => { + 'type' => 'text' + }, 'rest2fLogo' => { 'type' => 'text' }, @@ -3453,6 +3462,12 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a- 'totp2fIssuer' => { 'type' => 'text' }, + 'totp2fLabel' => { + 'type' => 'text' + }, + 'totp2fLogo' => { + 'type' => 'text' + }, 'totp2fRange' => { 'default' => 1, 'type' => 'int' @@ -3499,6 +3514,12 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a- 'u2fAuthnLevel' => { 'type' => 'int' }, + 'u2fLabel' => { + 'type' => 'text' + }, + 'u2fLogo' => { + 'type' => 'text' + }, 'u2fSelfRegistration' => { 'default' => 0, 'type' => 'boolOrExpr' @@ -3579,6 +3600,12 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a- 'utotp2fAuthnLevel' => { 'type' => 'int' }, + 'utotp2fLabel' => { + 'type' => 'text' + }, + 'utotp2fLogo' => { + 'type' => 'text' + }, 'vhostAliases' => { 'type' => 'text' }, @@ -3693,6 +3720,12 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a- 'yubikey2fClientID' => { 'type' => 'text' }, + 'yubikey2fLabel' => { + 'type' => 'text' + }, + 'yubikey2fLogo' => { + 'type' => 'text' + }, 'yubikey2fNonce' => { 'type' => 'text' }, diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm index cd6a41301..10381905e 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm @@ -1420,6 +1420,14 @@ sub attributes { documentation => 'Authentication level for users authentified by password+U2F' }, + u2fLabel => { + type => 'text', + documentation => 'Portal label for U2F' + }, + u2fLogo => { + type => 'text', + documentation => 'Custom logo for U2F', + }, u2fUserCanRemoveKey => { type => 'bool', default => 1, @@ -1446,6 +1454,14 @@ sub attributes { documentation => 'Authentication level for users authentified by password+TOTP' }, + totp2fLabel => { + type => 'text', + documentation => 'Portal label for TOTP 2F' + }, + totp2fLogo => { + type => 'text', + documentation => 'Custom logo for TOTP 2F', + }, totp2fIssuer => { type => 'text', documentation => 'TOTP Issuer', @@ -1497,6 +1513,14 @@ sub attributes { documentation => 'Authentication level for users authentified by password+(U2F or TOTP)' }, + utotp2fLabel => { + type => 'text', + documentation => 'Portal label for U2F+TOTP' + }, + utotp2fLogo => { + type => 'text', + documentation => 'Custom logo for U2F+TOTP', + }, # Mail second factor mail2fActivation => { @@ -1526,6 +1550,10 @@ sub attributes { documentation => 'Authentication level for users authenticated by Mail second factor' }, + mail2fLabel => { + type => 'text', + documentation => 'Portal label for Mail second factor' + }, mail2fLogo => { type => 'text', documentation => 'Custom logo for Mail 2F', @@ -1555,6 +1583,10 @@ sub attributes { documentation => 'Authentication level for users authentified by External second factor' }, + ext2fLabel => { + type => 'text', + documentation => 'Portal label for External second factor' + }, ext2fLogo => { type => 'text', documentation => 'Custom logo for External 2F', @@ -1595,6 +1627,10 @@ sub attributes { documentation => 'Authentication level for users authentified by REST second factor' }, + rest2fLabel => { + type => 'text', + documentation => 'Portal label for REST second factor' + }, rest2fLogo => { type => 'text', documentation => 'Custom logo for REST 2F', @@ -1616,6 +1652,14 @@ sub attributes { documentation => 'Authentication level for users authentified by Yubikey second factor' }, + yubikey2fLabel => { + type => 'text', + documentation => 'Portal label for Yubikey second factor' + }, + yubikey2fLogo => { + type => 'text', + documentation => 'Custom logo for Yubikey 2F', + }, yubikey2fClientID => { type => 'text', documentation => 'Yubico client ID', diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm index 93594db0b..41bc8c1e0 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm @@ -700,17 +700,18 @@ sub tree { title => 'utotp2f', help => 'utotp2f.html', form => 'simpleInputContainer', - nodes => - [ 'utotp2fActivation', 'utotp2fAuthnLevel' ] + nodes => [ + 'utotp2fActivation', 'utotp2fAuthnLevel', + 'utotp2fLabel', 'utotp2fLogo' + ] }, { - title => 'totp', + title => 'totp2f', help => 'totp2f.html', form => 'simpleInputContainer', nodes => [ 'totp2fActivation', 'totp2fSelfRegistration', - 'totp2fAuthnLevel', 'totp2fIssuer', 'totp2fInterval', 'totp2fRange', @@ -719,6 +720,9 @@ sub tree { 'totp2fUserCanChangeKey', 'totp2fUserCanRemoveKey', 'totp2fTTL', + 'totp2fAuthnLevel', + 'totp2fLabel', + 'totp2fLogo', ] }, { @@ -726,9 +730,10 @@ sub tree { help => 'u2f.html', form => 'simpleInputContainer', nodes => [ - 'u2fActivation', 'u2fSelfRegistration', - 'u2fAuthnLevel', 'u2fUserCanRemoveKey', - 'u2fTTL', + 'u2fActivation', 'u2fSelfRegistration', + 'u2fUserCanRemoveKey', 'u2fTTL', + 'u2fAuthnLevel', 'u2fLabel', + 'u2fLogo', ] }, { @@ -739,17 +744,18 @@ sub tree { 'mail2fActivation', 'mail2fCodeRegex', 'mail2fTimeout', 'mail2fSubject', 'mail2fBody', 'mail2fAuthnLevel', - 'mail2fLogo', + 'mail2fLabel', 'mail2fLogo', ] }, { - title => 'external2f', + title => 'ext2f', help => 'external2f.html', form => 'simpleInputContainer', nodes => [ 'ext2fActivation', 'ext2fCodeActivation', 'ext2FSendCommand', 'ext2FValidateCommand', - 'ext2fAuthnLevel', 'ext2fLogo', + 'ext2fAuthnLevel', 'ext2fLabel', + 'ext2fLogo', ] }, { @@ -759,7 +765,7 @@ sub tree { 'rest2fActivation', 'rest2fInitUrl', 'rest2fInitArgs', 'rest2fVerifyUrl', 'rest2fVerifyArgs', 'rest2fAuthnLevel', - 'rest2fLogo', + 'rest2fLabel', 'rest2fLogo', ] }, { @@ -769,7 +775,6 @@ sub tree { nodes => [ 'yubikey2fActivation', 'yubikey2fSelfRegistration', - 'yubikey2fAuthnLevel', 'yubikey2fClientID', 'yubikey2fSecretKey', 'yubikey2fNonce', @@ -777,6 +782,9 @@ sub tree { 'yubikey2fPublicIDSize', 'yubikey2fUserCanRemoveKey', 'yubikey2fTTL', + 'yubikey2fAuthnLevel', + 'yubikey2fLabel', + 'yubikey2fLogo', ], }, 'sfExtra', diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm index 426f62cfe..d02744af6 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm @@ -799,7 +799,8 @@ sub _scanNodes { $self->newConf->{$name} = {}; foreach my $node ( @{ $leaf->{nodes} } ) { my $tmp; - $tmp->{$_} = $node->{data}->{$_} foreach (qw(type rule)); + $tmp->{$_} = $node->{data}->{$_} + foreach (qw(type rule logo label)); $tmp->{over} = {}; foreach ( @{ $node->{data}->{over} } ) { $tmp->{over}->{ $_->[0] } = $_->[1]; diff --git a/lemonldap-ng-manager/site/coffee/manager.coffee b/lemonldap-ng-manager/site/coffee/manager.coffee index 5d53bca9c..75ebb1a0b 100644 --- a/lemonldap-ng-manager/site/coffee/manager.coffee +++ b/lemonldap-ng-manager/site/coffee/manager.coffee @@ -337,6 +337,8 @@ llapp.controller 'TreeCtrl', [ data: type: '' rule: '' + logo: '' + label: '' over: [] diff --git a/lemonldap-ng-manager/site/htdocs/static/forms/sfExtra.html b/lemonldap-ng-manager/site/htdocs/static/forms/sfExtra.html index a17175895..56faa0bbe 100644 --- a/lemonldap-ng-manager/site/htdocs/static/forms/sfExtra.html +++ b/lemonldap-ng-manager/site/htdocs/static/forms/sfExtra.html @@ -5,9 +5,11 @@ - - - + + + + + @@ -21,6 +23,12 @@ + + diff --git a/lemonldap-ng-manager/site/htdocs/static/forms/sfExtraContainer.html b/lemonldap-ng-manager/site/htdocs/static/forms/sfExtraContainer.html index 78889181b..9d78ecf50 100644 --- a/lemonldap-ng-manager/site/htdocs/static/forms/sfExtraContainer.html +++ b/lemonldap-ng-manager/site/htdocs/static/forms/sfExtraContainer.html @@ -5,9 +5,11 @@
+ + + +
- - - + + + + + @@ -21,6 +23,12 @@ + + diff --git a/lemonldap-ng-manager/site/htdocs/static/js/manager.js b/lemonldap-ng-manager/site/htdocs/static/js/manager.js index 1ae7f1742..54994fc88 100644 --- a/lemonldap-ng-manager/site/htdocs/static/js/manager.js +++ b/lemonldap-ng-manager/site/htdocs/static/js/manager.js @@ -392,6 +392,8 @@ This file contains: data: { type: '', rule: '', + logo: '', + label: '', over: [] } }); diff --git a/lemonldap-ng-manager/site/htdocs/static/js/manager.min.js b/lemonldap-ng-manager/site/htdocs/static/js/manager.min.js index f6e4a0db9..77e7c4b2c 100644 --- a/lemonldap-ng-manager/site/htdocs/static/js/manager.min.js +++ b/lemonldap-ng-manager/site/htdocs/static/js/manager.min.js @@ -1 +1 @@ -(function(){var llapp;llapp=angular.module("llngManager",["ui.tree","ui.bootstrap","llApp","ngCookies"]);llapp.controller("TreeCtrl",["$scope","$http","$location","$q","$uibModal","$translator","$cookies","$htmlParams",function($scope,$http,$location,$q,$uibModal,$translator,$cookies,$htmlParams){var _checkSaveResponse,_download,_getAll,_stoggle,c,id,pathEvent,readError,setDefault,setHelp;$scope.links=window.links;$scope.menu=$htmlParams.menu;$scope.menulinks=window.menulinks;$scope.staticPrefix=window.staticPrefix;$scope.formPrefix=window.formPrefix;$scope.availableLanguages=window.availableLanguages;$scope.waiting=true;$scope.showM=false;$scope.showT=false;$scope.form="home";$scope.currentCfg={};$scope.confPrefix=window.confPrefix;$scope.message={};$scope.result="";$scope.translateTitle=function(node){return $translator.translateField(node,"title")};$scope.translateP=$translator.translateP;$scope.translate=$translator.translate;$scope.helpUrl="start.html#configuration";$scope.setShowHelp=function(val){var d;if(val==null){val=!$scope.showH}$scope.showH=val;d=new Date(Date.now());d.setFullYear(d.getFullYear()+1);return $cookies.put("showhelp",val?"true":"false",{expires:d})};$scope.showH=$cookies.get("showhelp")==="false"?false:true;if($scope.showH==null){$scope.setShowHelp(true)}readError=function(response){var e,j;e=response.status;j=response.statusLine;$scope.waiting=false;if(e===403){$scope.message={title:"forbidden",message:"",items:[]}}else if(e===401){console.log("Authentication needed");$scope.message={title:"authenticationNeeded",message:"__waitOrF5__",items:[]}}else if(e===400){$scope.message={title:"badRequest",message:j,items:[]}}else if(e>0){$scope.message={title:"badRequest",message:j,items:[]}}else{$scope.message={title:"networkProblem",message:"",items:[]}}return $scope.showModal("message.html")};$scope.showModal=function(tpl,init){var d,modalInstance;modalInstance=$uibModal.open({templateUrl:tpl,controller:"ModalInstanceCtrl",size:"lg",resolve:{elem:function(){return function(s){return $scope[s]}},set:function(){return function(f,s){return $scope[f]=s}},init:function(){return init}}});d=$q.defer();modalInstance.result.then(function(msgok){$scope.message={title:"",message:"",items:[]};return d.resolve(msgok)},function(msgnok){$scope.message={title:"",message:"",items:[]};return d.reject(msgnok)});return d.promise};$scope.menuClick=function(button){if(button.popup){window.open(button.popup)}else{if(!button.action){button.action=button.title}switch(typeof button.action){case"function":button.action($scope.currentNode,$scope);break;case"string":$scope[button.action]();break;default:console.log(typeof button.action)}}return $scope.showM=false};$scope.home=function(){$scope.form="home";return $scope.showM=false};_checkSaveResponse=function(data){var m;$scope.message={title:"",message:"",items:[],itemsE:[],itemsNC:[],itemsW:[]};if(data.needConfirm){$scope.confirmNeeded=true}if(data.message){$scope.message.message=data.message}if(data.details){for(m in data.details){if(m!=="__changes__"){if(m==="__needConfirmation__"){$scope.message.itemsNC.push({message:m,items:data.details[m]});console.log("NeedConfirmation:",$scope.message.itemsNC)}else if(m==="__warnings__"){$scope.message.itemsW.push({message:m,items:data.details[m]});console.log("Warnings:",$scope.message.itemsW)}else{$scope.message.itemsE.push({message:m,items:data.details[m]});console.log("Errors:",$scope.message.itemsE)}}}$scope.message.items=$scope.message.itemsE.concat($scope.message.itemsNC.concat($scope.message.itemsW))}$scope.waiting=false;if(data.result===1){$location.path("/confs/");$scope.message.title="successfullySaved"}else{$scope.message.title="saveReport"}return $scope.showModal("message.html")};$scope.downloadConf=function(){return window.open($scope.confPrefix+$scope.currentCfg.cfgNum+"?full=1")};$scope.save=function(){$scope.showModal("save.html").then(function(){$scope.waiting=true;$scope.data.push({id:"cfgLog",title:"cfgLog",data:$scope.result?$scope.result:""});return $http.post(window.confPrefix+"?cfgNum="+$scope.currentCfg.cfgNum+($scope.forceSave?"&force=1":""),$scope.data).then(function(response){$scope.data.pop();return _checkSaveResponse(response.data)},function(response){readError(response);return $scope.data.pop()})},function(){return console.log("Saving canceled")});return $scope.showM=false};$scope.saveRawConf=function($fileContent){$scope.waiting=true;return $http.post(window.confPrefix+"/raw",$fileContent).then(function(response){return _checkSaveResponse(response.data)},readError)};$scope.restore=function(){$scope.currentNode=null;return $scope.form="restore"};$scope.cancel=function(){$scope.currentNode.data=null;return $scope.getKey($scope.currentNode)};id=1;$scope._findContainer=function(){return $scope._findScopeContainer().$modelValue};$scope._findScopeContainer=function(){var cs;cs=$scope.currentScope;while(!cs.$modelValue.type.match(/Container$/)){cs=cs.$parentNodeScope}return cs};$scope._findScopeByKey=function(k){var cs;cs=$scope.currentScope;while(!(cs.$modelValue.title===k)){cs=cs.$parentNodeScope}return cs};$scope.newGrantRule=function(){var l,n,node;node=$scope._findContainer();l=node.nodes.length;n=l>0?l-1:0;return node.nodes.push({id:node.id+"/n"+id++,title:"New rule",re:"Message",comment:"New rule",data:"1",type:"grant"})};$scope.newRule=function(){var l,n,node;node=$scope._findContainer();l=node.nodes.length;n=l>0?l-1:0;return node.nodes.splice(n,0,{id:node.id+"/n"+id++,title:"New rule",re:"^/new",comment:"New rule",data:"accept",type:"rule"})};$scope.newPost=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"/absolute/path/to/form",data:{},type:"post"})};$scope.newPostVar=function(){if($scope.currentNode.data.vars==null){$scope.currentNode.data.vars=[]}return $scope.currentNode.data.vars.push(["var1","$uid"])};$scope.newAuthChoice=function(){var node;node=$scope._findContainer();node.nodes.push({id:node.id+"/n"+id++,title:"1_Key",data:["Null","Null","Null"],type:"authChoice"});return $scope.execFilters($scope._findScopeByKey("authParams"))};$scope.newHashEntry=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",data:"",type:"keyText"})};$scope.newCat=function(){var cs;cs=$scope.currentScope;if(cs.$modelValue.type==="menuApp"){cs=cs.$parentNodeScope}return cs.$modelValue.nodes.push({id:cs.$modelValue.id+"/n"+id++,title:"New category",type:"menuCat",nodes:[]})};$scope.newApp=function(){var cs;cs=$scope.currentScope;if(cs.$modelValue.type==="menuApp"){cs=cs.$parentNodeScope}return cs.$modelValue.nodes.push({id:cs.$modelValue.id+"/n"+id++,title:"New application",type:"menuApp",data:{description:"New app description",uri:"https://test.example.com/",logo:"network.png",display:"auto"}})};$scope.newCmbMod=function(){var node;node=$scope._findContainer();node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"cmbModule",data:{type:"LDAP",for:"0",over:[]}});return $scope.execFilters($scope._findScopeByKey("authParams"))};$scope.newSfExtra=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"sfExtra",data:{type:"",rule:"",over:[]}})};$scope.newSfOver=function(){var d;d=$scope.currentNode.data;if(!d.over){d.over=[]}return d.over.push(["new"+id++,""])};$scope.newCmbOver=function(){var d;d=$scope.currentNode.data;if(!d.over){d.over=[]}return d.over.push(["new"+id++,""])};$scope.newChoiceOver=function(){var d;d=$scope.currentNode.data;console.log("data",d);if(!d[5]){d[5]=[]}return d[5].push(["new"+id++,""])};$scope.addHost=function(){var cn;cn=$scope.currentNode;if(!cn.data){cn.data=[]}return cn.data.push({k:"newHost",h:[{k:"key",v:"uid"}]})};$scope.addSamlAttribute=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"samlAttribute",data:["0","New","",""]})};$scope.addVhost=function(){var name;name=$scope.domain?"."+$scope.domain.data:".example.com";$scope.message={title:"virtualHostName",field:"hostname"};return $scope.showModal("prompt.html",name).then(function(){var n;n=$scope.result;if(n){return $scope.addTemplateNode(n,"virtualHost")}})};$scope.duplicateVhost=function(){var name;name=$scope.domain?"."+$scope.domain.data:".example.com";$scope.message={title:"virtualHostName",field:"hostname"};return $scope.showModal("prompt.html",name).then(function(){var n;n=$scope.result;return $scope.duplicateNode(n,"virtualHost",$scope.currentNode.title)})};$scope.addSamlIDP=function(){return $scope.newTemplateNode("samlIDPMetaDataNode","samlPartnerName","idp-example")};$scope.addSamlSP=function(){return $scope.newTemplateNode("samlSPMetaDataNode","samlPartnerName","sp-example")};$scope.addOidcOp=function(){return $scope.newTemplateNode("oidcOPMetaDataNode","oidcOPName","op-example")};$scope.addOidcRp=function(){return $scope.newTemplateNode("oidcRPMetaDataNode","oidcRPName","rp-example")};$scope.addCasSrv=function(){return $scope.newTemplateNode("casSrvMetaDataNode","casPartnerName","srv-example")};$scope.addCasApp=function(){return $scope.newTemplateNode("casAppMetaDataNode","casPartnerName","app-example")};$scope.newTemplateNode=function(type,title,init){$scope.message={title:title,field:"name"};return $scope.showModal("prompt.html",init).then(function(){var name;name=$scope.result;if(name){return $scope.addTemplateNode(name,type)}})};$scope.addTemplateNode=function(name,type){var cs,t;cs=$scope.currentScope;while(cs.$modelValue.title!==type+"s"){cs=cs.$parentNodeScope}t={id:type+"s/new__"+name,title:name,type:type,nodes:templates(type,"new__"+name)};setDefault(t.nodes);cs.$modelValue.nodes.push(t);cs.expand();return t};setDefault=function(node){var len,n,o;for(o=0,len=node.length;o0){tmp=p.nodes[ind];p.nodes[ind]=p.nodes[ind-1];p.nodes[ind-1]=tmp}return ind};$scope.inSelect=function(value){var len,n,o,ref;ref=$scope.currentNode.select;for(o=0,len=ref.length;o0?node.comment:node.re};$scope.filters={};$scope.execFilters=function(scope){var filter,func,ref;scope=scope?scope:$scope;ref=$scope.filters;for(filter in ref){func=ref[filter];if($scope.filters.hasOwnProperty(filter)){return window.filterFunctions[filter](scope,$q,func)}}return false};$scope.stoggle=function(scope){var node;node=scope.$modelValue;_stoggle(node);return scope.toggle()};_stoggle=function(node){var a,len,len1,len2,n,o,q,r,ref,ref1,ref2;ref=["nodes","nodes_cond"];for(o=0,len=ref.length;o0){$scope.message={title:"badRequest",message:j,items:[]}}else{$scope.message={title:"networkProblem",message:"",items:[]}}return $scope.showModal("message.html")};$scope.showModal=function(tpl,init){var d,modalInstance;modalInstance=$uibModal.open({templateUrl:tpl,controller:"ModalInstanceCtrl",size:"lg",resolve:{elem:function(){return function(s){return $scope[s]}},set:function(){return function(f,s){return $scope[f]=s}},init:function(){return init}}});d=$q.defer();modalInstance.result.then(function(msgok){$scope.message={title:"",message:"",items:[]};return d.resolve(msgok)},function(msgnok){$scope.message={title:"",message:"",items:[]};return d.reject(msgnok)});return d.promise};$scope.menuClick=function(button){if(button.popup){window.open(button.popup)}else{if(!button.action){button.action=button.title}switch(typeof button.action){case"function":button.action($scope.currentNode,$scope);break;case"string":$scope[button.action]();break;default:console.log(typeof button.action)}}return $scope.showM=false};$scope.home=function(){$scope.form="home";return $scope.showM=false};_checkSaveResponse=function(data){var m;$scope.message={title:"",message:"",items:[],itemsE:[],itemsNC:[],itemsW:[]};if(data.needConfirm){$scope.confirmNeeded=true}if(data.message){$scope.message.message=data.message}if(data.details){for(m in data.details){if(m!=="__changes__"){if(m==="__needConfirmation__"){$scope.message.itemsNC.push({message:m,items:data.details[m]});console.log("NeedConfirmation:",$scope.message.itemsNC)}else if(m==="__warnings__"){$scope.message.itemsW.push({message:m,items:data.details[m]});console.log("Warnings:",$scope.message.itemsW)}else{$scope.message.itemsE.push({message:m,items:data.details[m]});console.log("Errors:",$scope.message.itemsE)}}}$scope.message.items=$scope.message.itemsE.concat($scope.message.itemsNC.concat($scope.message.itemsW))}$scope.waiting=false;if(data.result===1){$location.path("/confs/");$scope.message.title="successfullySaved"}else{$scope.message.title="saveReport"}return $scope.showModal("message.html")};$scope.downloadConf=function(){return window.open($scope.confPrefix+$scope.currentCfg.cfgNum+"?full=1")};$scope.save=function(){$scope.showModal("save.html").then(function(){$scope.waiting=true;$scope.data.push({id:"cfgLog",title:"cfgLog",data:$scope.result?$scope.result:""});return $http.post(window.confPrefix+"?cfgNum="+$scope.currentCfg.cfgNum+($scope.forceSave?"&force=1":""),$scope.data).then(function(response){$scope.data.pop();return _checkSaveResponse(response.data)},function(response){readError(response);return $scope.data.pop()})},function(){return console.log("Saving canceled")});return $scope.showM=false};$scope.saveRawConf=function($fileContent){$scope.waiting=true;return $http.post(window.confPrefix+"/raw",$fileContent).then(function(response){return _checkSaveResponse(response.data)},readError)};$scope.restore=function(){$scope.currentNode=null;return $scope.form="restore"};$scope.cancel=function(){$scope.currentNode.data=null;return $scope.getKey($scope.currentNode)};id=1;$scope._findContainer=function(){return $scope._findScopeContainer().$modelValue};$scope._findScopeContainer=function(){var cs;cs=$scope.currentScope;while(!cs.$modelValue.type.match(/Container$/)){cs=cs.$parentNodeScope}return cs};$scope._findScopeByKey=function(k){var cs;cs=$scope.currentScope;while(!(cs.$modelValue.title===k)){cs=cs.$parentNodeScope}return cs};$scope.newGrantRule=function(){var l,n,node;node=$scope._findContainer();l=node.nodes.length;n=l>0?l-1:0;return node.nodes.push({id:node.id+"/n"+id++,title:"New rule",re:"Message",comment:"New rule",data:"1",type:"grant"})};$scope.newRule=function(){var l,n,node;node=$scope._findContainer();l=node.nodes.length;n=l>0?l-1:0;return node.nodes.splice(n,0,{id:node.id+"/n"+id++,title:"New rule",re:"^/new",comment:"New rule",data:"accept",type:"rule"})};$scope.newPost=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"/absolute/path/to/form",data:{},type:"post"})};$scope.newPostVar=function(){if($scope.currentNode.data.vars==null){$scope.currentNode.data.vars=[]}return $scope.currentNode.data.vars.push(["var1","$uid"])};$scope.newAuthChoice=function(){var node;node=$scope._findContainer();node.nodes.push({id:node.id+"/n"+id++,title:"1_Key",data:["Null","Null","Null"],type:"authChoice"});return $scope.execFilters($scope._findScopeByKey("authParams"))};$scope.newHashEntry=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",data:"",type:"keyText"})};$scope.newCat=function(){var cs;cs=$scope.currentScope;if(cs.$modelValue.type==="menuApp"){cs=cs.$parentNodeScope}return cs.$modelValue.nodes.push({id:cs.$modelValue.id+"/n"+id++,title:"New category",type:"menuCat",nodes:[]})};$scope.newApp=function(){var cs;cs=$scope.currentScope;if(cs.$modelValue.type==="menuApp"){cs=cs.$parentNodeScope}return cs.$modelValue.nodes.push({id:cs.$modelValue.id+"/n"+id++,title:"New application",type:"menuApp",data:{description:"New app description",uri:"https://test.example.com/",logo:"network.png",display:"auto"}})};$scope.newCmbMod=function(){var node;node=$scope._findContainer();node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"cmbModule",data:{type:"LDAP",for:"0",over:[]}});return $scope.execFilters($scope._findScopeByKey("authParams"))};$scope.newSfExtra=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"sfExtra",data:{type:"",rule:"",logo:"",label:"",over:[]}})};$scope.newSfOver=function(){var d;d=$scope.currentNode.data;if(!d.over){d.over=[]}return d.over.push(["new"+id++,""])};$scope.newCmbOver=function(){var d;d=$scope.currentNode.data;if(!d.over){d.over=[]}return d.over.push(["new"+id++,""])};$scope.newChoiceOver=function(){var d;d=$scope.currentNode.data;console.log("data",d);if(!d[5]){d[5]=[]}return d[5].push(["new"+id++,""])};$scope.addHost=function(){var cn;cn=$scope.currentNode;if(!cn.data){cn.data=[]}return cn.data.push({k:"newHost",h:[{k:"key",v:"uid"}]})};$scope.addSamlAttribute=function(){var node;node=$scope._findContainer();return node.nodes.push({id:node.id+"/n"+id++,title:"new",type:"samlAttribute",data:["0","New","",""]})};$scope.addVhost=function(){var name;name=$scope.domain?"."+$scope.domain.data:".example.com";$scope.message={title:"virtualHostName",field:"hostname"};return $scope.showModal("prompt.html",name).then(function(){var n;n=$scope.result;if(n){return $scope.addTemplateNode(n,"virtualHost")}})};$scope.duplicateVhost=function(){var name;name=$scope.domain?"."+$scope.domain.data:".example.com";$scope.message={title:"virtualHostName",field:"hostname"};return $scope.showModal("prompt.html",name).then(function(){var n;n=$scope.result;return $scope.duplicateNode(n,"virtualHost",$scope.currentNode.title)})};$scope.addSamlIDP=function(){return $scope.newTemplateNode("samlIDPMetaDataNode","samlPartnerName","idp-example")};$scope.addSamlSP=function(){return $scope.newTemplateNode("samlSPMetaDataNode","samlPartnerName","sp-example")};$scope.addOidcOp=function(){return $scope.newTemplateNode("oidcOPMetaDataNode","oidcOPName","op-example")};$scope.addOidcRp=function(){return $scope.newTemplateNode("oidcRPMetaDataNode","oidcRPName","rp-example")};$scope.addCasSrv=function(){return $scope.newTemplateNode("casSrvMetaDataNode","casPartnerName","srv-example")};$scope.addCasApp=function(){return $scope.newTemplateNode("casAppMetaDataNode","casPartnerName","app-example")};$scope.newTemplateNode=function(type,title,init){$scope.message={title:title,field:"name"};return $scope.showModal("prompt.html",init).then(function(){var name;name=$scope.result;if(name){return $scope.addTemplateNode(name,type)}})};$scope.addTemplateNode=function(name,type){var cs,t;cs=$scope.currentScope;while(cs.$modelValue.title!==type+"s"){cs=cs.$parentNodeScope}t={id:type+"s/new__"+name,title:name,type:type,nodes:templates(type,"new__"+name)};setDefault(t.nodes);cs.$modelValue.nodes.push(t);cs.expand();return t};setDefault=function(node){var len,n,o;for(o=0,len=node.length;o0){tmp=p.nodes[ind];p.nodes[ind]=p.nodes[ind-1];p.nodes[ind-1]=tmp}return ind};$scope.inSelect=function(value){var len,n,o,ref;ref=$scope.currentNode.select;for(o=0,len=ref.length;o0?node.comment:node.re};$scope.filters={};$scope.execFilters=function(scope){var filter,func,ref;scope=scope?scope:$scope;ref=$scope.filters;for(filter in ref){func=ref[filter];if($scope.filters.hasOwnProperty(filter)){return window.filterFunctions[filter](scope,$q,func)}}return false};$scope.stoggle=function(scope){var node;node=scope.$modelValue;_stoggle(node);return scope.toggle()};_stoggle=function(node){var a,len,len1,len2,n,o,q,r,ref,ref1,ref2;ref=["nodes","nodes_cond"];for(o=0,len=ref.length;ologger->debug('Processing Extra 2F modules'); - foreach my $extraKey (sort keys %{ $self->conf->{sfExtra} } ) { + foreach my $extraKey ( sort keys %{ $self->conf->{sfExtra} } ) { my $moduleType = $self->conf->{sfExtra}->{$extraKey}->{type}; next unless ($moduleType); @@ -113,6 +113,12 @@ sub init { my $rule = $self->conf->{sfExtra}->{$extraKey}->{rule} || 1; my $prefix = $m->prefix; + # Overwrite logo and label from user configuration + $m->logo( $self->conf->{sfExtra}->{$extraKey}->{logo} ) + if $self->conf->{sfExtra}->{$extraKey}->{logo}; + $m->label( $self->conf->{sfExtra}->{$extraKey}->{label} ) + if $self->conf->{sfExtra}->{$extraKey}->{label}; + # Compile rule $rule = $self->p->HANDLER->substitute($rule); unless ( $rule = $self->p->HANDLER->buildSub($rule) ) { @@ -322,7 +328,14 @@ sub run { MAIN_LOGO => $self->conf->{portalMainLogo}, SKIN => $self->p->getSkin($req), TOKEN => $token, - MODULES => [ map { { CODE => $_->prefix, LOGO => $_->logo } } @am ], + MODULES => [ + map { { + CODE => $_->prefix, + LOGO => $_->logo, + LABEL => $_->label + } + } @am + ], CHECKLOGINS => $checkLogins } ); diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm index a46d0adeb..d850a927c 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm @@ -29,9 +29,7 @@ sub init { } } $self->prefix( $self->conf->{sfPrefix} ) - if ( $self->conf->{sfPrefix} ); - $self->logo( $self->conf->{ext2fLogo} ) - if ( $self->conf->{ext2fLogo} ); + if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } if ( $self->conf->{ext2fCodeActivation} ) { @@ -41,9 +39,7 @@ sub init { } $self->random( Lemonldap::NG::Common::Crypto::srandom() ); $self->prefix( $self->conf->{sfPrefix} ) - if ( $self->conf->{sfPrefix} ); - $self->logo( $self->conf->{ext2fLogo} ) - if ( $self->conf->{ext2fLogo} ); + if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } return 0; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm index 554d4f62a..9a9319cbd 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm @@ -45,8 +45,6 @@ sub init { $self->error("Missing 'mailSessionKey' parameter, aborting"); return 0; } - $self->logo( $self->conf->{mail2fLogo} ) - if ( $self->conf->{mail2fLogo} ); $self->prefix( $self->conf->{sfPrefix} ) if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm index 9ff4657c0..a7dcfd9dc 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm @@ -30,8 +30,7 @@ sub init { return 0; } $self->prefix( $self->conf->{sfPrefix} ) - if ( $self->conf->{sfPrefix} ); - $self->logo( $self->conf->{rest2fLogo} ) if ( $self->conf->{rest2fLogo} ); + if ( $self->conf->{sfPrefix} ); foreach my $k ( keys %{ $self->conf->{rest2fInitArgs} } ) { my $attr = $self->conf->{rest2fInitArgs}->{$k}; $attr =~ s/^$//; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm index ae70812d0..62006772d 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/Yubikey.pm @@ -103,8 +103,7 @@ sub run { my $maxSize = $self->conf->{max2FDevices}; $self->logger->debug("Nbr 2FDevices = $size / $maxSize"); if ( $size >= $maxSize ) { - $self->userLogger->warn( - "Max number of 2F devices is reached"); + $self->userLogger->warn("Max number of 2F devices is reached"); return $self->p->sendHtml( $req, 'error', params => { diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm index 5f66f4a38..7de331c0a 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm @@ -125,8 +125,7 @@ sub verify { unless ( $session->{__ch} and $session->{__ch} eq $challenge ) { $self->userLogger->error( -"U2F challenge changed by user: $session->{__ch} / $challenge" - ); + "U2F challenge changed by user: $session->{__ch} / $challenge"); $req->error(PE_BADCREDENTIALS); return $self->fail($req); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm index b3e807623..347cc81f5 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm @@ -356,7 +356,8 @@ sub reloadConf { unless ( $_[0]->pdata->{keepPdata} ) { $self->logger->debug('Cleaning pdata'); $_[0]->pdata( {} ); - $self->userLogger->notice( $_[0]->user . ' connected' ) if $_[0]->user; + $self->userLogger->notice( $_[0]->user . ' connected' ) + if $_[0]->user; } return PE_OK; }; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm index 8fd6ec75c..7290bd3a9 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm @@ -31,10 +31,21 @@ has prefix => ( is => 'rw' ); has logo => ( is => 'rw', default => '2f.png' ); +has label => ( is => 'rw' ); + has noRoute => ( is => 'ro' ); sub init { my ($self) = @_; + + # Set logo if overriden + $self->logo( $self->conf->{ $self->prefix . "2fLogo" } ) + if ( $self->conf->{ $self->prefix . "2fLogo" } ); + + # Set label if provided, translation files will be used otherwise + $self->label( $self->conf->{ $self->prefix . "2fLabel" } ) + if ( $self->conf->{ $self->prefix . "2fLabel" } ); + unless ( $self->noRoute ) { $self->logger->debug( 'Adding ' . $self->prefix . '2fcheck routes' ); $self->addAuthRoute( diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/ar.json b/lemonldap-ng-portal/site/htdocs/static/languages/ar.json index 68d5ecbb0..ed24221c9 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/ar.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/ar.json @@ -132,6 +132,7 @@ "enterYubikey":"يرجى استخدام يوبي كي الخاص بك", "errorMsg":"رسالة خاطئة", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"الاسم الاول", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"البريد", +"mail2f":"Email code", "mailSent2":"تم إرسال رسالة إلى عنوان بريدك الإلكتروني.", "maintenanceMode":"هذا التطبيق في صيانة، يرجى محاولة الاتصال في وقت لاحق", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"هل تريد إعادة إرسال رسالة التأكيد؟", "resentConfirm":"هل تريد إعادة إرسال رسالة التأكيد؟", "resetPwd":"إعادة تعيين كلمة المرور الخاصة بي", +"rest2f":"Verification code", "rightsReloadNeedsLogout":" إعادة تحميل الحقوق تحتاج إلى تسجيل الخروج وتسجيل الدخول مرة أخرى", "scope":"نطاق", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"ابق على اتصال على هذا الجهاز", "submit":"قدم", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"يرجى لمس جهاز U2F وامض الآن.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"نوع", +"u2f":"U2F Key", "u2fFailed":"فشل التحقق من U2F. أعد محاولة الاتصال بالمشرف أو اتصل به", "u2fPermission":"قد تتم مطالبتك بالسماح للموقع إذن الوصول إلى مفاتيح الأمان الخاصة بك.بعد منح الإذن، سيبدأ الجهاز في العملية.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"ترقية الجلسة", "user":"المستخدم", "useYubikey":"استخدم اليوبي كي الخاص بك", +"utotp2f":"TOTP-or-U2F", "value":"القيمة", "verify":"التحقق", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"رقم هاتفك", "yourProfile":"ملفك الشخصي", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/de.json b/lemonldap-ng-portal/site/htdocs/static/languages/de.json index 33c8f0be2..e4f856615 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/de.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/de.json @@ -132,6 +132,7 @@ "enterYubikey":"Benutze bitte deinen Yubikey", "errorMsg":"Fehlermeldung", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fülle das Formular aus", "firstName":"Vorname", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Von Dienstanbietern abmelden ...", "macros":"MACROS", "mail":"E-Mail", +"mail2f":"Email code", "mailSent2":"Eine Nachricht wurde an deine E-Mail Adresse gesendet.", "maintenanceMode":"Diese Anwendung ist in Wartung, bitte versuche später eine Verbindung herzustellen", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Bestätigungsmail erneuert senden ?", "resentConfirm":"Möchtest du, dass die Bestätigungsmail erneut gesendet wird ?", "resetPwd":"Mein Passwort zurücksetzen", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Zum Neuladen der Rechte musst du dich ab- und wieder anmelden", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Auf diesem Gerät verbunden bleiben", "submit":"Absenden", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"Es existiert bereits ein TOTP-Secret", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Typ", +"u2f":"U2F Key", "u2fFailed":"U2F-Überprüfung fehlgeschlagen. Versuchen Sie es erneut oder wenden Sie sich an Ihren Administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F - Geräteverwaltung", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"Benutzer", "useYubikey":"Benutze deinen Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Ihre Telefonnummer", "yourProfile":"Ihr Profil", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/en.json b/lemonldap-ng-portal/site/htdocs/static/languages/en.json index 981541153..596ac0bc0 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/en.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/en.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Error Message", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"First name", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"A message has been sent to your mail address.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rest2f":"Verification code", "rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected": "Stay connected on this device", "submit":"Submit", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice": "Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp": "Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed": "U2F verification failed. Retry or contact your administrator", "u2fPermission": "You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome": "U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"User", "useYubikey":"use your Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify": "Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Your phone number", "yourProfile":"Your profile", -"yourTotpKey":"Your TOTP key" +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" } diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/es.json b/lemonldap-ng-portal/site/htdocs/static/languages/es.json index a861c4fd5..ed2efa818 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/es.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/es.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Error Message", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"First name", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"A message has been sent to your mail address.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Stay connected on this device", "submit":"Submit", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"User", "useYubikey":"use your Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Your phone number", "yourProfile":"Your profile", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/fi.json b/lemonldap-ng-portal/site/htdocs/static/languages/fi.json index 5ea3f1931..66e471fa9 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/fi.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/fi.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Virhe viesti", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"Etunimi", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Sähköposti", +"mail2f":"Email code", "mailSent2":"Viesti on lähetetty sähköpostiisi.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Uudelleen lähetä vahvistus sähköposti?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Palauta salasanani?", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Stay connected on this device", "submit":"Lähetä", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"Käyttäjä", "useYubikey":"Käytä Yubikeytä", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Vahvista", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Puhelinnumerosi", "yourProfile":"Profiilisi", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json index 804fe199a..29cc5f441 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json @@ -132,6 +132,7 @@ "enterYubikey":"Utilisez votre Yubikey", "errorMsg":"Message d'erreur", "expired2Fremoved":"%s seconds facteurs expirés ont été supprimés !", +"ext2f":"Code de vérification", "fillTheForm":"Remplissez le formulaire", "forbidden":"Accès INTERDIT", "firstName":"Prénom", @@ -161,6 +162,7 @@ "logoutFromSP":"Déconnexion des services ...", "macros":"MACROS", "mail":"Adresse mail", +"mail2f":"Code par mail", "mailSent2":"Un message a été envoyé à votre adresse mail.", "maintenanceMode":"Cette application est en maintenance, merci de réessayer plus tard", "maxNumberof2FDevicesReached":"Nombre maximum de seconds facteurs atteint !", @@ -206,6 +208,7 @@ "resendConfirmMail":"Renvoyer le mail de confirmation ?", "resentConfirm":"Voulez-vous que le message de confirmation soit renvoyé ?", "resetPwd":"Réinitialiser mon mot de passe", +"rest2f":"Code de vérification", "rightsReloadNeedsLogout": "Le rechargement des droits nécessite une déconnexion", "scope": "Informations", "search":"Chercher", @@ -221,10 +224,12 @@ "stayConnected": "Rester connecté sur cet appareil", "submit":"Envoyer", "switchContext":"Changer de contexte", +"totp2f":"Application OTP", "totpExistingKey":"Un secret TOTP existe déjà !", "touchU2fDevice": "Posez votre doigt sur le périphérique U2F", "touchU2fDeviceOrEnterTotp": "Posez votre doigt sur le périphérique U2F ou entrez le code TOTP", "type":"Type", +"u2f":"Clé U2F", "u2fFailed": "La vérification U2F a échoué. Réessayez ou contactez votre administrateur", "u2fPermission": "Il est possible qu'on vous demande d'autoriser le site à accéder à votre clef. Après votre accord, la clef clignotera.", "u2fWelcome": "Gestion du périphérique U2F", @@ -235,6 +240,7 @@ "upgradeSession":"Se réauthentifier", "user":"Utilisateur", "useYubikey":"Utilisez votre Yubikey", +"utotp2f":"TOTP-ou-U2F", "value":"Valeur", "verify": "Vérifier", "VHnotFound":"Hôte virtuel erroné ou inexistant", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Votre nouvelle clef TOTP. Testez-la et entrez le code", "yourPhone":"Votre numéro de téléphone", "yourProfile":"Vos informations personnelles", -"yourTotpKey":"Votre clef TOTP" +"yourTotpKey":"Votre clef TOTP", +"yubikey2f":"Yubikey" } diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/it.json b/lemonldap-ng-portal/site/htdocs/static/languages/it.json index 0a9929b97..78b2f4d08 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/it.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/it.json @@ -132,6 +132,7 @@ "enterYubikey":"Utilizza il tuo Yubikey", "errorMsg":"Messaggio di errore", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Compila il modulo", "firstName":"Nome", "forbidden":"Accesso VIETATO", @@ -161,6 +162,7 @@ "logoutFromSP":"Disconnessione dai fornitori di servizi ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"Vi é stato inviato un messaggio via mail", "maintenanceMode":"Questa applicazione è in manutenzione, prova a connetterti più tardi", "maxNumberof2FDevicesReached":"Raggiunto il numero massimo di dispositivi 2F !", @@ -206,6 +208,7 @@ "resendConfirmMail":"Inviare nuovamente mail di conferma?", "resentConfirm":"Vuoi inviare di nuovo la mail di conferma?", "resetPwd":"Reimpostare la password", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Le ricariche dei diritti necessitano di disconnettersi e di riconnettersi", "scope":"Ambito", "search":"Ricerca", @@ -221,10 +224,12 @@ "stayConnected":"Resta connesso su questo dispositivo", "submit":"Invia", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"Un segreto TOTP esiste già", "touchU2fDevice":"Adesso tocca il dispositivo U2F lampeggiante.", "touchU2fDeviceOrEnterTotp":"Tocca il dispositivo U2F lampeggiante o inserisci il codice TOTP.", "type":"Tipo", +"u2f":"U2F Key", "u2fFailed":"Verifica U2F non riuscita. Riprovare o contattare l'amministratore", "u2fPermission":"È possibile che venga richiesto di consentire il permesso del sito per accedere alle chiavi di sicurezza. Dopo aver concesso il permesso, il dispositivo inizierà a lampeggiare.", "u2fWelcome":"Gestione dei dispositivi U2F", @@ -235,6 +240,7 @@ "upgradeSession":"Sessione di aggiornamento", "user":"Utente", "useYubikey":"Usa la tua Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Valore", "verify":"Verifica", "VHnotFound":"Host virtuale non trovato", @@ -255,5 +261,6 @@ "yourNewTotpKey":"La tua nuova chiave TOTP, per favore provala e inserisci il codice", "yourPhone":"Numero di telefono", "yourProfile":"Il tuo profilo", -"yourTotpKey":"La tua chiave TOTP" -} \ No newline at end of file +"yourTotpKey":"La tua chiave TOTP", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/nl.json b/lemonldap-ng-portal/site/htdocs/static/languages/nl.json index 1c61db6ef..9ba32178d 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/nl.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/nl.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Error Message", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"First name", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"A message has been sent to your mail address.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Stay connected on this device", "submit":"Submit", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"User", "useYubikey":"use your Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Your phone number", "yourProfile":"Your profile", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/pt.json b/lemonldap-ng-portal/site/htdocs/static/languages/pt.json index 06317ce34..c9eaf84fd 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/pt.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/pt.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Error Message", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"First name", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"A message has been sent to your mail address.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Stay connected on this device", "submit":"Submit", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"User", "useYubikey":"use your Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Your phone number", "yourProfile":"Your profile", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/ro.json b/lemonldap-ng-portal/site/htdocs/static/languages/ro.json index 33f519551..d150ecba3 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/ro.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/ro.json @@ -132,6 +132,7 @@ "enterYubikey":"Please use your Yubikey", "errorMsg":"Error Message", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"First name", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Mail", +"mail2f":"Email code", "mailSent2":"A message has been sent to your mail address.", "maintenanceMode":"This application is in maintenance, please try to connect later", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Rights reloads need to logout and login again", "scope":"Scope", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Stay connected on this device", "submit":"Submit", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Upgrade session", "user":"User", "useYubikey":"use your Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"Verify", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Your phone number", "yourProfile":"Your profile", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/vi.json b/lemonldap-ng-portal/site/htdocs/static/languages/vi.json index 041235a0a..fadd335f0 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/vi.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/vi.json @@ -132,6 +132,7 @@ "enterYubikey":"Vui lòng sử dụng Yubikey của bạn", "errorMsg":"Thông báo lỗi", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"Tên", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"MACROS", "mail":"Thư", +"mail2f":"Email code", "mailSent2":"Một tin nhắn đã được gửi đến địa chỉ thư của bạn.", "maintenanceMode":"Ứng dụng này đang trong quá trình bảo trì, hãy thử kết nối sau", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"Gửi lại thư xác nhận?", "resentConfirm":"Bạn có muốn gửi lại thư xác nhận không?", "resetPwd":"Đặt lại mật khẩu của tôi", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"Tải lại quyền cần đăng xuất và đăng nhập lại", "scope":"Phạm vi", "search":"Search", @@ -221,10 +224,12 @@ "stayConnected":"Giữ kết nối trên thiết bị này", "submit":"Gửi", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Vui lòng chạm vào thiết bị U2F nhấp nháy ngay bây giờ.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Loại", +"u2f":"U2F Key", "u2fFailed":"Xác minh U2F thất bại. Thử lại hoặc liên hệ với quản trị viên của bạn ", "u2fPermission":"Bạn có thể được nhắc cho phép trang web được phép truy cập vào các khóa bảo mật của bạn. Sau khi cho phép, thiết bị sẽ bắt đầu nhấp nháy. ", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"Phiên nâng cấp", "user":"Người dùng", "useYubikey":"sử dụng Yubikey của bạn", +"utotp2f":"TOTP-or-U2F", "value":"Giá trị", "verify":"Xác minh", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"Số điện thoại của bạn", "yourProfile":"Profile của bạn", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/zh.json b/lemonldap-ng-portal/site/htdocs/static/languages/zh.json index 52fc84b53..1f60f4b38 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/zh.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/zh.json @@ -132,6 +132,7 @@ "enterYubikey":"请使用您的Yubikey", "errorMsg":"错误消息", "expired2Fremoved":"%s expired 2F devices have been removed!", +"ext2f":"Verification code", "fillTheForm":"Fill the form", "firstName":"名", "forbidden":"Access FORBIDDEN", @@ -161,6 +162,7 @@ "logoutFromSP":"Logout from service providers ...", "macros":"宏", "mail":"邮件", +"mail2f":"Email code", "mailSent2":"已经发送一封邮件到您的邮箱", "maintenanceMode":"程序维护中,请稍后再尝试连接。", "maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!", @@ -206,6 +208,7 @@ "resendConfirmMail":"重新发送确认邮件?", "resentConfirm":"您想确认邮件被重新发送吗?", "resetPwd":"重置我的密码", +"rest2f":"Verification code", "rightsReloadNeedsLogout":"重新加载权限需要登出并且再次登录", "scope":"Scope", "search":"搜索", @@ -221,10 +224,12 @@ "stayConnected":"在该项设备上保持连接", "submit":"提交", "switchContext":"Switch context", +"totp2f":"OTP App", "totpExistingKey":"A TOTP secret already exists", "touchU2fDevice":"Please touch the flashing U2F device now.", "touchU2fDeviceOrEnterTotp":"Please touch the flashing U2F device or enter TOTP code.", "type":"Type", +"u2f":"U2F Key", "u2fFailed":"U2F verification failed. Retry or contact your administrator", "u2fPermission":"You may be prompted to allow the site permission to access your security keys. After granting permission, the device will start to blink.", "u2fWelcome":"U2F device management", @@ -235,6 +240,7 @@ "upgradeSession":"升级会话", "user":"用户", "useYubikey":"使用您的 Yubikey", +"utotp2f":"TOTP-or-U2F", "value":"Value", "verify":"验证", "VHnotFound":"Virtual Host not found", @@ -255,5 +261,6 @@ "yourNewTotpKey":"Your new TOTP key, please test it and enter the code", "yourPhone":"您的电话号码", "yourProfile":"您的档案", -"yourTotpKey":"Your TOTP key" -} \ No newline at end of file +"yourTotpKey":"Your TOTP key", +"yubikey2f":"Yubikey" +} diff --git a/lemonldap-ng-portal/site/templates/bootstrap/2fchoice.tpl b/lemonldap-ng-portal/site/templates/bootstrap/2fchoice.tpl index 594282385..d0ca66862 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/2fchoice.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/2fchoice.tpl @@ -9,6 +9,13 @@ " /> diff --git a/lemonldap-ng-portal/t/77-2F-Extra.t b/lemonldap-ng-portal/t/77-2F-Extra.t index 20e3d2f09..fb3531f4d 100644 --- a/lemonldap-ng-portal/t/77-2F-Extra.t +++ b/lemonldap-ng-portal/t/77-2F-Extra.t @@ -11,23 +11,23 @@ count(1); my $client = LLNG::Manager::Test->new( { ini => { - logLevel => 'error', - authentication => 'Demo', - userDB => 'Same', - 'sfExtra' => { + logLevel => 'error', + authentication => 'Demo', + userDB => 'Same', + 'sfExtra' => { 'home' => { 'over' => { - mail2fCodeRegex => '\w{4}', - mail2fLogo => 'home.jpg', + mail2fCodeRegex => '\w{4}', }, + 'logo' => 'home.jpg', 'rule' => '$uid eq "dwho" or $uid eq "msmith"', 'type' => 'Mail2F' }, 'work' => { 'over' => { - mail2fLogo => 'work.jpg', - mail2fCodeRegex => '\d{8}', + mail2fCodeRegex => '\d{8}', }, + 'logo' => 'work.jpg', 'rule' => '$uid eq "dwho" or $uid eq "rtyler"', 'type' => 'Mail2F' } @@ -95,7 +95,6 @@ ok( ); count(1); - # Expect choice page my ( $host, $url, $query ) = expectForm( $res, undef, '/2fchoice', 'token', 'checkLogins' ); @@ -103,14 +102,14 @@ my ( $host, $url, $query ) = ok( $res->[2]->[0] =~ qq%work2F%, - 'Found work.png' + 'Found work.jpg' ) or print STDERR Dumper( $res->[2]->[0] ); count(1); ok( $res->[2]->[0] =~ qq%home2F%, - 'Found home.png' + 'Found home.jpg' ) or print STDERR Dumper( $res->[2]->[0] ); count(1);
+ + + +