Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Automatic Authentication
kensey #1
Member since Jan 2017 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Automatic Authentication
I'd like to use dokuwiki as a documentation system for a desktop application. I'd basically have a web panel in my application that would show dokuwiki content that is hosted on my server. There are 2 requirements:

1) Some content needs to be protected through ACL against editing or even viewing by groups of users. So authentication in the wiki is a hard requirement.
2) Users already have to authenticate when they start the application. So they should be automatically authenticated to the wiki. In other words, they should not be required to first login in the web panel but the login should happen automatically with their username and password.

What are the options for this? Is there any way to pass user credential as parameters to the login page. Is this even possible with dokuwiki?
cziehr #2
Member since Jan 2011 · 401 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
It depends on the system you have already in use for your authentification.

Search for "single sign on" or "sso" to get further information.
kensey #3
Member since Jan 2017 · 2 posts
Group memberships: Members
Show profile · Link to this post
SOO authentication is a real pain to get working when not using web technologies and especially when different user groups use different underlying auth systems. Here is a really simple solution that I came up with, in case it may help anyone else:

I am using a javafx webview to show wiki documentation within the application.
For each group of users (different customers have different parts of the wiki visible to them) I use a separate read only help user which has the correct permission set via ACL.
When I start the webview I look for 'permission_denied' and then log in with the customer specific help user credentials using java script:

javafx.scene.web.WebView view = new javafx.scene.web.WebView();
view.getEngine().getLoadWorker().stateProperty().addListener((obs,oldValue,newValue)-> {
            if( newValue != Worker.State.SUCCEEDED )
            if (view.getEngine().getDocument().getElementById("permission_denied")!=null) {
                String script = "var form = document.getElementById('dw__login');"+
                                "if (form!=null) {form.elements['u'].value='"+Config.get("wiki.user")+

Since this is a read only user covering a whole user group this won't work for editing persmissions, but that's fine, it fits my use case well enough.
This post was edited on 2017-02-09, 19:03 by kensey.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-04-26, 06:02:08 (UTC +02:00)