DokuWiki Yubikey Auth Module

DokuWiki Yubikey Auth Module
web, dokuwiki, auth, module
Auth module for Dokuwiki that extends Plaintext auth to support Yubikey validation
Last Update:
There is a glaring bug in this module which causes a user to become signed out after a short period of time. I have begun rewriting this to follow a similar format to the OpenID plugin (using a plugin instead of an Auth module).

This method is outdated, please see the project at dokuwiki-plugin-yubikey


This project implements an extension to the Plaintext authentication module provided by Dokuwiki, which allows a user to optionally use their Yubikey OTP to authenticate instead of their password.


Installation is quite simple. First you must download and verify the release package (specified in the releases section of this page).

Next extract the package on top of your DokuWiki installation directory (we'll assume it's ${DOKU} and the path to the release package is ${yubi}).

unzip ${yubi} -d ${DOKU}

Next you need to replace the YubiKey API ID with your own in order to communicate with the YubiKey servers.

Open the file inc/auth/yubikey.class.php and change where AUTH_YUBIKEY_API_ID is set to -1 to be set to your personal API ID.



The backend will be enabled with the config:authtype configuration option

$conf['authtype'] = "yubikey";

(this should be in your conf/local.php)

Users and Passwords

The yubikey auth module extends the default auth:plain module, so configuration, addition, and deletion of users is done through that module.

(this should be done in conf/users.auth.php)


Yubikey IDs are associated to users in a file format similar to the plain auth module's users.auth.php.

Empty lines, and everything after a # character are ignored. Each line contains a colon separated array of 2 fields which are:

  • Login - This has to be a valid login.
  • Yubikeys - Comma separated list of Yubikey OTP IDs (the first 12 characters when a Yubikey enters its OTP.



(this should be done in conf/yubikey.auth.php)


Source for this module can be found on github:


The latest source can always be downloaded from this location:

projects/web/dokuwiki-auth-yubikey.txt · Last modified: 2014/05/13 12:36 (external edit)

Hosted on Microsoft Azure Powered by PHP Driven by DokuWiki RSS Feed

© 2011 Austen Dicken |