DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:oauth

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:oauth [2021-12-16 18:07] – [Configuration] andiplugin:oauth [2024-03-05 23:51] (current) – version upped andi
Line 6: Line 6:
 email      : dokuwiki@cosmocode.de email      : dokuwiki@cosmocode.de
 type       : auth, action type       : auth, action
-lastupdate : 2021-12-15 +lastupdate : 2024-03-05 
-compatible : Greebo, Hogfather+compatible : Greebo, Hogfather, Igor, Jack Jackrum, Kaos
 depends    :  depends    : 
 conflicts  conflicts 
Line 21: Line 21:
 ---- ----
  
-[[http://www.linuxhotel.de/|{{ http://www.linuxhotel.de/pics/logo-2008-250.png?150|sponsored by Linuxhotel}}]]+[[http://www.linuxhotel.de/|{{ https://www.linuxhotel.de/wp-content/themes/liho/img/linuxhotel.svg?150&recache|sponsored by Linuxhotel}}]]
 The initial development of this plugin has been sponsored by [[http://www.linuxhotel.de/|Linuxhotel]]. The initial development of this plugin has been sponsored by [[http://www.linuxhotel.de/|Linuxhotel]].
  
 ===== Installation ===== ===== Installation =====
  
-[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
Line 47: Line 47:
   * [[plugin:oauthgithub|Github oAuth]]   * [[plugin:oauthgithub|Github oAuth]]
   * [[plugin:oauthcognito|Amazon Cognito oAuth]]   * [[plugin:oauthcognito|Amazon Cognito oAuth]]
 +  * [[plugin:oauthazure|Microsoft Azure oAuth]]
   * [[plugin:oauthgeneric|Generic oAuth]]   * [[plugin:oauthgeneric|Generic oAuth]]
 +  * [[plugin:oauthkeycloak|Keycloak oAuth]]
 +  * [[plugin:oauthwechange|WECHANGE oAuth]]
  
 More can easily be created (see [[#development]] section below) More can easily be created (see [[#development]] section below)
Line 61: Line 64:
  
 Once the application is set up it will display a "key" and a "secret". These have to be set up in the configuration manager. Once done the service can be used for login. Once the application is set up it will display a "key" and a "secret". These have to be set up in the configuration manager. Once done the service can be used for login.
 +
 +In addition the oauth plugin has a few global options that will apply to all provider plugins.
 +
 +| ''custom-redirectURI'' | You can this to override the autodetected Redirect URI. Unless you know what you're doing you probably don't want to set anything here. |
 +| ''mailRestriction'' | Only users that have an email ending in the domain set here will be able to authenticate. Must start with an ''@'' |
 +| ''singleService'' | Login with single oAuth service only (disables local logins!) |
 +| ''register-on-auth'' | Register authenticated users even if self-registration is disabled in main configuration. Otherwise an admin needs to create a local user first before they can login via oAuth |
 +| ''overwrite-groups'' | Overwrite all DokuWiki user groups by those supplied by provider |
 +
  
 ===== User Management ===== ===== User Management =====
Line 74: Line 86:
 Users can login through any of the services enabled in their profile - for that to work, their email address configured in DokuWiki must match with the primary address known to the service. Users can login through any of the services enabled in their profile - for that to work, their email address configured in DokuWiki must match with the primary address known to the service.
  
 +Each logged in user is added automatically to group of the name of the service, f.e ''azure'':
 +  * [[https://github.com/cosmocode/dokuwiki-plugin-oauth/blob/05d29310ce98af896825bca44d3cab16d9aab92f/auth.php#L139|auth.php:139]]
  
 ===== Development ===== ===== Development =====
Line 80: Line 94:
  
 Have a look at [[https://github.com/cosmocode/dokuwiki-plugin-oauthdoorkeeper|Implementation for Doorkeeper]] to get an idea about what is needed. Have a look at [[https://github.com/cosmocode/dokuwiki-plugin-oauthdoorkeeper|Implementation for Doorkeeper]] to get an idea about what is needed.
- 
  
 ==== Service ==== ==== Service ====
Line 117: Line 130:
   * ''registerServiceClass()'' -- return either the name of a Lusitania provided service (''facebook'') or the fully qualified class name of the service class you implemented   * ''registerServiceClass()'' -- return either the name of a Lusitania provided service (''facebook'') or the fully qualified class name of the service class you implemented
   * ''getColor()'' -- a hex color to use on the login button. use your IdPs primary color here   * ''getColor()'' -- a hex color to use on the login button. use your IdPs primary color here
 +  * ''logout()'' -- do the procedures required on logout, if any (available as of **2021-12-19**)
  
 ==== Additionals ==== ==== Additionals ====
Line 128: Line 142:
  
 {{rss>https://github.com/cosmocode/dokuwiki-plugin-oauth/commits/master.atom date}} {{rss>https://github.com/cosmocode/dokuwiki-plugin-oauth/commits/master.atom date}}
- 
  
plugin/oauth.1639674468.txt.gz · Last modified: 2021-12-16 18:07 by andi

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