It's better when it's simple

User Tools

Site Tools


Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community

Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy



intercept requests before authentication
DokuWiki's own login

This Event allows to provide authentication on a per request basis by using signatures or tokens instead of the default DokuWiki login or cookies. The event is triggered by auth_setup() in inc/auth.php and by login() in inc/RemoteAPICore.php.

Since 2010-01-29, there is an AFTER event available.

The global $AUTH_ACL is not set up when this event is triggered.

Passed Data

The passed Doku_Event object has the fields: $data and $result.

The field $data is an associative array containing the login parameters as entries:

  • user – User name
  • password – Password
  • sticky – Cookie should not expire
  • silent – Don't show error on bad authentication

If the BEFORE event handler does not $event->preventDefault() those parameters are passed to auth_login() via a wrapper function. The parameters in the $data field can be modified here as well.

The $result field is set by the default function to true on successful authentication, otherwise false. The AFTER event handler can changes this return value, but the default login action is then already tried.

See also

devel/event/auth_login_check.txt · Last modified: 2018-12-08 15:00 by torpedo