Change grant_type password to client_credentials, add scope and client_secret#91
Change grant_type password to client_credentials, add scope and client_secret#91Fosten wants to merge 3 commits intofarmOS:mainfrom
Conversation
Fosten
commented
Apr 10, 2024
- Password grant is no longer supported. Adds client_credentials.
- Adds option for scope
- Adds option for client_secret
paul121
left a comment
There was a problem hiding this comment.
Awesome @Fosten :-) but... you can enable that contrib module to get password credentials as an option.
I'm less familiar with farmos.js, but could we allow there to be two OAuth options? One for password and one for client credentials?
In the next release of farmos.py I delegate this out to an external OAuth library. You instantiate your OAuth/Authentication method first and then bring that as an option when instantiating the farmOS client. It makes things a bit more flexible but does require one more step.
It would be great to have both. I use the password credentials quite a bit in my test suite and it would be nice not to have to rebuild all of that. |