Skip to content

x42/dokuoauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

see http://mir.dnsalias.com/wiki/dokuoauth

oAuth-tokens and keys are stored in DOKU_CONF.'oauth.inidb' in .ini db file format.

Much or this plugin is work in progress - DON'T USE FOR PRODUCTION.


The dokuoauth plugin requires a small patch to dokuwiki intoducing a 
new Event-Hook: ACTION_ON_AUTH

--- a/inc/auth.php
+++ b/inc/auth.php
@@ -72,7 +72,13 @@
         // external trust mechanism in place
         $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
       }else{
-        auth_login($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
+        $evt = new Doku_Event('ACTION_ON_AUTH',$ACT);
+        $evt->advise_before();
+        if(empty($_SERVER['REMOTE_USER'])) {
+            auth_login($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
+        }
+        $evt->advise_after();
+        unset($evt);
       }
     }
---

OAuth.php and OAuth_DokuServer.php are based on http://oauth.googlecode.com/svn/code/php/
by Andy Smith under MIT license. -  This dokuwiki plugin is distrubuted in terms of the GPL.