Table of Contents

How to write an Authentication Backend ?

:!: The authentication backends developed as described on this page would only work at DokuWiki releases 2012-10-13 “Adora Belle” and older.

See for development documentation about the new authentications plugins on Auth Plugins

Please UPDATE/REWRITE to the new Auth Plugins (these old Auth Backends are not supported anymore)

DokuWiki's authentication system is highly modular and can, generally speaking, authenticate using anything that is accessible from PHP.

If none of the provided auth does what you want, you can simply create your own. Backends are:

In your class you need to override a few methods and set some public fields from the base class. Some descriptions follow, but for the doing the implementation you need to have a look at base class' comments!

If you write a new backend be sure to share your code with the community!

Fields to set

addUser can Users be created?
delUser can Users be deleted?
modLogin can login names be changed?
modPass can passwords be changed?
modName can real names be changed?
modMail can emails be changed?
modGroups can groups be changed?
getUsers can a (filtered) list of users be retrieved?
getUserCount can the number of users be retrieved?
getGroups can a list of available groups be retrieved?
external does the module do external auth checking?
logoff has the module some special logoff method?

Required Methods

Only a few functions need to be implemented. But the more you do the more the frontend will be able to do.

See inc/auth/basic.class.php for the methods' arguments and return values.

Optional Methods

All these methods are optional and will only be called if the appropriate $cando fields are set