hwelch-fle / plankapy

A Python interface for Plankaban
https://hwelch-fle.github.io/plankapy/
GNU Affero General Public License v3.0
19 stars 8 forks source link

Planka Auth with a SSO backend #8

Closed jpjoux closed 6 days ago

jpjoux commented 1 week ago

Hello Team

I am trying to use you python project in order to use Planka API

Our planka is configured to use our SSO portal for managing authentication (ie not login/password).

How does the authentication is working by using your Planka python package ? I seams that only login/password is possible.

Is it possible to provide a custom bearer token in order to manage authentication ?

Have you got a python example ?

hwelch-fle commented 1 week ago

I haven't added support for SSO as I haven't used planka with it and don't have a testing environment.

I've added a bypass to the username and password authentication method for now in b4c3873, that should let you pass a token provided by your SSO and bypass the username/password login

planka = Planka("https://planka.mydomain.com", access_token="mytoken")

Should be all you need now to get it working as intended

jpjoux commented 1 week ago

Thanks for your proposal It seems interresting to have the capability to provide an auth token

May be I am wrong but your new constructor def init(self, url:str, username:str, password:str, templates=None, access_token=None) seems to request login/password as mandatory args

hwelch-fle commented 1 week ago

Thanks for catching that. This is what I get for trying to hotfix code while doing 5 other things at work haha.

Latest commit (7a93330) makes the constructor arguments all keyword except url. I plan on re-writing a lot of this code once Planka 2 is released.

jpjoux commented 6 days ago

I have tested from a clone of your master branch: It works ! It can be closed.

Can you publish a new release on Pypi ?

hwelch-fle commented 6 days ago

Released under v1.0.1 tag and deployed to PyPi