2018-02-23 12:25:47 +01:00
<!DOCTYPE html>
< html lang = "en" dir = "ltr" >
< head >
< meta charset = "utf-8" / >
< title > documentation:2.0:rest2f< / title >
< meta name = "generator" content = "DokuWiki" / >
2018-04-17 10:33:26 +02:00
< meta name = "robots" content = "index,follow" / >
2018-02-23 12:25:47 +01:00
< meta name = "keywords" content = "documentation,2.0,rest2f" / >
< link rel = "search" type = "application/opensearchdescription+xml" href = "lib/exe/opensearch.html" title = "LemonLDAP::NG" / >
< link rel = "start" href = "rest2f.html" / >
< link rel = "contents" href = "rest2f.html" title = "Sitemap" / >
< link rel = "stylesheet" type = "text/css" href = "lib/exe/css.php.t.bootstrap3.css" / >
<!-- //if:usedebianlibs
< link rel = "stylesheet" type = "text/css" href = "/javascript/bootstrap/css/bootstrap.min.css" / >
//elsif:useexternallibs
< link rel = "stylesheet" type = "text/css" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" > < / script >
//elsif:cssminified
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.min.css" / >
//else -->
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.css" / >
<!-- //endif -->
< script type = "text/javascript" > / * < ! [ C D A T A [ * / v a r N S = ' d o c u m e n t a t i o n : 2 . 0 ' ; v a r J S I N F O = { " i d " : " d o c u m e n t a t i o n : 2 . 0 : r e s t 2 f " , " n a m e s p a c e " : " d o c u m e n t a t i o n : 2 . 0 " } ;
/*!]]>*/< / script >
< script type = "text/javascript" charset = "utf-8" src = "lib/exe/js.php.t.bootstrap3.js" > < / script >
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery/jquery.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/jquery-2.2.0.min.js" > < / script >
//elsif:jsminified
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.min.js" > < / script >
//else -->
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.js" > < / script >
<!-- //endif -->
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery-ui/jquery-ui.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/ui/1.10.4/jquery-ui.min.js" > < / script >
//elsif:jsminified
2018-03-08 13:29:31 +01:00
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.min.js" > < / script >
2018-02-23 12:25:47 +01:00
//else -->
2018-03-08 13:29:31 +01:00
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.js" > < / script >
2018-02-23 12:25:47 +01:00
<!-- //endif -->
< / head >
< body >
< div class = "dokuwiki export container" >
<!-- TOC START -->
< div id = "dw__toc" >
< h3 class = "toggle" > Table of Contents< / h3 >
< div >
< ul class = "toc" >
< li class = "level2" > < div class = "li" > < a href = "#configuration" > Configuration< / a > < / div > < / li >
< li class = "level1" > < div class = "li" > < a href = "#arguments" > Arguments< / a > < / div > < / li >
< li class = "level1" > < div class = "li" > < a href = "#rest_dialog" > REST Dialog< / a > < / div > < / li >
< / ul >
< / div >
< / div >
<!-- TOC END -->
< h1 class = "sectionedit1" id = "rest_second_factor" > REST Second Factor< / h1 >
< div class = "level1" >
< p >
2018-11-26 14:15:43 +01:00
This plugin can be used to append a second factor authentication device like SMS or OTP. It uses an external web service to submit and validate the second factor.
2018-02-23 12:25:47 +01:00
< / p >
< / div >
2018-11-26 14:15:43 +01:00
<!-- EDIT1 SECTION "REST Second Factor" [1 - 198] -->
2018-02-23 12:25:47 +01:00
< h3 class = "sectionedit2" id = "configuration" > Configuration< / h3 >
< div class = "level3" >
< p >
2018-11-26 14:15:43 +01:00
All parameters are set in “General Parameters » Portal Parameters » Second Factors » REST 2nd Factor”.
2018-02-23 12:25:47 +01:00
< / p >
< ul >
< li class = "level1" > < div class = "li" > < strong > Activation< / strong > < / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Init < abbr title = "Uniform Resource Locator" > URL< / abbr > < / strong > < em > (optional)< / em > : REST < abbr title = "Uniform Resource Locator" > URL< / abbr > to initialize dialog < em > (send OTP)< / em > . Leave it blank if your < abbr title = "Application Programming Interface" > API< / abbr > doesn' t need any initialization< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Init arguments< / strong > : list of arguments to send < em > (see below)< / em > < / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Verify < abbr title = "Uniform Resource Locator" > URL< / abbr > < / strong > < em > (required)< / em > : REST < abbr title = "Uniform Resource Locator" > URL< / abbr > to verify code< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Verify arguments< / strong > : list of arguments to send < em > (see below)< / em > < / div >
< / li >
2018-11-26 14:15:43 +01:00
< li class = "level1" > < div class = "li" > < strong > Authentication Level< / strong > : if you want to overwrite the value sent by your authentication module, you can define here a new authentication level. Example: 5< / div >
2018-02-23 12:25:47 +01:00
< / li >
2019-06-28 16:53:45 +02:00
< li class = "level1" > < div class = "li" > < strong > Logo< / strong > (optional): logo file < em > (in static/< skin> directory)< / em > < / div >
2018-03-20 19:42:50 +01:00
< / li >
2018-02-23 12:25:47 +01:00
< / ul >
< / div >
2019-06-28 16:53:45 +02:00
<!-- EDIT2 SECTION "Configuration" [199 - 908] -->
2018-02-23 12:25:47 +01:00
< h2 class = "sectionedit3" id = "arguments" > Arguments< / h2 >
< div class = "level2" >
< p >
Arguments are a list of key/value. Key is the name of JSON entry, value is attribute or macro name.
< / p >
< div class = "noteimportant" > For Verify < abbr title = "Uniform Resource Locator" > URL< / abbr > , you should send $code at least
< / div >
< / div >
2019-06-28 16:53:45 +02:00
<!-- EDIT3 SECTION "Arguments" [909 - 1103] -->
2018-02-23 12:25:47 +01:00
< h2 class = "sectionedit4" id = "rest_dialog" > REST Dialog< / h2 >
< div class = "level2" >
< p >
2018-11-26 14:15:43 +01:00
REST web services have just to reply with a “result” key in a JSON file. Auth/UserDB can add an “info” array. It will be stored in session data (without reading “Exported variables”).
2018-02-23 12:25:47 +01:00
< / p >
< div class = "table sectionedit5" > < table class = "inline table table-bordered table-striped" >
< thead >
< tr class = "row0 roweven" >
< th class = "col0 centeralign" > < abbr title = "Uniform Resource Locator" > URL< / abbr > < / th > < th class = "col1 centeralign" > Query < / th > < th class = "col2 centeralign" > Response < / th >
< / tr >
< / thead >
< tr class = "row1 rowodd" >
2019-02-12 17:32:02 +01:00
< td class = "col0 centeralign" > Init < abbr title = "Uniform Resource Locator" > URL< / abbr > < / td > < td class = "col1" > JSON file: < code > {“user”:$user,...}< / code > < / td > < td class = "col2" > JSON file: < code > {“result”:true/false}< / code > < / td >
2018-02-23 12:25:47 +01:00
< / tr >
< tr class = "row2 roweven" >
2019-02-12 17:32:02 +01:00
< td class = "col0 centeralign" > Verify < abbr title = "Uniform Resource Locator" > URL< / abbr > < / td > < td class = "col1" > JSON file: < code > {“user”:$user,“code”:“$code”,...}< / code > < / td > < td class = "col2" > JSON file: < code > {“result”:true/false}< / code > < / td >
2018-02-23 12:25:47 +01:00
< / tr >
< / table > < / div >
2019-06-28 16:53:45 +02:00
<!-- EDIT5 TABLE [1314 - 1543] -->
2018-02-23 12:25:47 +01:00
< / div >
2019-06-28 16:53:45 +02:00
<!-- EDIT4 SECTION "REST Dialog" [1104 - ] --> < / div >
2018-02-23 12:25:47 +01:00
< / body >
< / html >