DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:auth_login_check

AUTH_LOGIN_CHECK

Description:
intercept requests before authentication
DefaultAction:
DokuWiki's own login
Preventable:
yes
Added:
2009-03-13

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

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki