cosmocode / dokuwiki-plugin-oauth

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

Gitlab Oauth + advanced rules #98

Closed xxorax closed 2 years ago

xxorax commented 3 years ago

I added Gitlab adapter to allow to use Oauth with any gitlab instance, including self-hosted.

The phpoauthlib did not have suitable adapter for it, and it was not possible to use the Generic adapter without breaking some code that already depends on it. So, as I see that some adapters have already been adapted for DokuWiki, I simply added it.

You can configue your Gitlab base URL, and also set the text on the button displayed on the login form (you may not want it always display "Gitlab").

Also, I added an advanced-rules features that allow you to accept users to connect only if the match the rules. The rules depend on data retrieved from the API (user, groups, or projects). They unfortunately use a non-commun syntax, but I guess it's still easy to understand.

Feel free to ask, comment, modify or merge it.

sag1 commented 3 years ago

Hello,

When it will be released ?

freaknils commented 3 years ago

Will there be a release soon? Thanks!

splitbrain commented 2 years ago

Sorry for the long delay. Please see #111 for the reasons and how to implement new services in the future.

lprobsth commented 2 years ago

@xxorax I implemented your proposed changes in a plugin for the new oauth design by splitbrain:

https://github.com/lprobsth/dokuwiki-plugin-oauthgitlab