cosmocode / dokuwiki-plugin-oauth

Generic oAuth1 and oAuth2 plugin for DokuWiki
http://www.dokuwiki.org/plugin:oauth
30 stars 79 forks source link

Help me test the new version of the oAuth Plugin #111

Closed splitbrain closed 2 years ago

splitbrain commented 2 years ago

As you may have noticed, development of this plugin hasn't really progressed in the last years with many open issues and unmerged pull requests.

Other than lack of time, the main reason was that I was unhappy with the plugin. I didn't want to work on a thing I didn't like.

The overall architecture was not as clean as I wanted it, so it was hard to figure out what went wrong when something went wrong. I also didn't like that the only way to add new services was by going through a pull request - placing the burden on me to ensure the code works (but I couldn't because I wasn't using those services).

This weekend I finally came around to rebuilt the plugin as I wanted (based on some work my colleague @annda did a while ago).

oAuth Plugin System

The plugin itself does not enable any services. When you upgrade to the new version you will lose all access to your currently configured services!

This is because services are now implemented in separate plugins, that have to be installed separately. These Plugins implement what you already know as Adapters, set the color, logo, name etc. of the service and can optionally also implement a completely new Service not included in the lusitania oAuth library.

Currently the following plugins are available:

Note: Because I do not have access to any other services, I will probably not maintain any other Service plugins. However if you're currently using any other service or want a custom service implemented, please contact CosmoCode for professional services.

Probably fixed bugs

The following issues might be fixed (on purpose or accidentally) with this version: #109 #83 #72 #70 #68 #67 #45

In addition all questions and pull requests for new services can now be solved by writing additional plugins.

Testing

If you are an admin, using any of the above services in your Wiki currently. Please give this a try and report any problems you're having.

If you are a developer and implemented a oAuth adapter before (eg you submitted a PR, that I ignored or even merged) please see if you're able to implement a plugin based on the new system. No documentation is available yet, but it shouldn't be hard to figure out based on the plugins linked above. Please let me know if you encounter problems, are missing a mechanism or have suggestions for smoother implementation.

How to test it

All new code is in the refactor branch. You can check it out with git or you can use the following URLs in your Extension Manager under "Manual Install":

haneef95 commented 2 years ago

Thanks for the update.

So, this oAuth plugin can be used with any generic oAuth providers? (as suggested in PR #79 ?)

That should just be sufficient tbh, with just some community geared configuration instructions for each provider. And the generic oAuth plugin just has to conform to the oAuth 2.0 standards.

splitbrain commented 2 years ago

@haneef95 no the plugin itself does not authenticate with any service. Those have to be implemented as separate plugins. However I added a (untested) generic plugin as suggested in #79. Also: oAuth 2.0 does not define any standards for retrieving user data, thus the need for adapter classes. However OpenID Connect (which is based on Oauth2) does provide that standard. Implementing a OIDC plugin for the OAuth Plugin should be relatively straight forward and the Generic plugin I added should be able to work with any OIDC endpoint as well.

haneef95 commented 2 years ago

Thanks @splitbrain .

oAuth 2.0 does not define any standards for retrieving user data.

Yes, that's right. Hence, the need for the fieldmap, as implemented in #79.

So, we need to install the plugin in this repo, as the base, and additional plugins for each service?

Also, the https://github.com/cosmocode/dokuwiki-plugin-oauthgeneric/ repo is 404 atm.

splitbrain commented 2 years ago

So, we need to install the plugin in this repo, as the base, and additional plugins for each service?

yes

Also, the https://github.com/cosmocode/dokuwiki-plugin-oauthgeneric/ repo is 404 atm.

fixed. the repo was private

haneef95 commented 2 years ago

Thanks

So, we need to install the plugin in this repo, as the base, and additional plugins for each service?

yes

In that case, I would suggest that the refactor branch is forked as another plugin (possibly dokuwiki-plugin-oauth-adapter) and this repo is deprecated. So, that users who just hit update on the plugin don't end up breaking their functionalities.

Hopefully, I'll get round to testing the new setup coming weekend.

Lineflyer commented 2 years ago

I will try to set this on my ToDo next weeks after Christmas to check fix of #67