[10:14:54] | <paul121[m]> | If we drop password grant (I'm becoming more and more convinced we should) then we need to make it easier for users to make private consumers (with a `client_secret`) that they can use with the client credentials grant. |
[10:14:54] | <paul121[m]> | This is how I would recommend people run scripts via the API, configuring a separate consumer for a specific user, perhaps even separate consumers for each script/workflow you work on. |
[10:15:19] | <paul121[m]> | We also need to get more formal client credentials and auth code grant supper in the client libs |
[10:18:33] | <symbioquine[m]> | > <@paul121:matrix.org> If we drop password grant (I'm becoming more and more convinced we should) then we need to make it easier for users to make private consumers (with a `client_secret`) that they can use with the client credentials grant. |
[10:18:35] | <symbioquine[m]> | > |
[10:18:35] | <symbioquine[m]> | > This is how I would recommend people run scripts via the API, configuring a separate consumer for a specific user, perhaps even separate consumers for each script/workflow you work on. |
[10:18:35] | <symbioquine[m]> | Related: https://farmos.discourse.group/t/using-farmos-2-x-as-a-oauth2-authorizat... |
[10:18:51] | <paul121[m]> | <FarmerEd[m]> "I guess my issue is I'm trying..." <- Haven't read the latest on the forum, but I think the refresh grant should be pretty universal & work for all use cases. In the more custom OAuth integrations I have done I add a bit of logic that checks the expiration time before each request goes out, if it's about to expire, then do a refresh real quick, then continue the request. |
[10:18:56] | <paul121[m]> | Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in` |
[10:20:03] | <symbioquine[m]> | symbioquine[m]: That's how I'm currently managing my consumer configurations as code |
[10:20:51] | <FarmerEd[m]> | > <@paul121:matrix.org> Haven't read the latest on the forum, but I think the refresh grant should be pretty universal & work for all use cases. In the more custom OAuth integrations I have done I add a bit of logic that checks the expiration time before each request goes out, if it's about to expire, then do a refresh real quick, then continue the request. |
[10:20:51] | <FarmerEd[m]> | > Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in` |
[10:20:51] | <FarmerEd[m]> | Yea, that's pretty much the strategy I've implemented in latest experiments |
[10:21:59] | <FarmerEd[m]> | Gone for expires at (-2min) which is probably overkill |
[10:23:58] | <paul121[m]> | symbioquine[m]: Okay! So private consumers. But no user assigned to them, presumably because you're only using this for SSO, not CRUDing data? |
[10:24:33] | <FarmerEd[m]> | Client credentials doesn't return a refresh token, so you need the reauthenticate with the same credentials |
[10:25:28] | <symbioquine[m]> | paul121[m]: SSO and one read-only script at the moment |
[10:25:57] | <paul121[m]> | FarmerEd[m]: Oh really? |
[10:26:18] | <symbioquine[m]> | symbioquine[m]: You're right I'd need to modify it a bit to set the user if I wanted read-write scripts to make changes as a specific user. |
[10:26:51] | <symbioquine[m]> | symbioquine[m]: (or on behalf of a human) |
[10:28:12] | <paul121[m]> | And if you needed something robust for multiple users you would use auth code :-) |
[10:28:50] | <FarmerEd[m]> | paul121[m]: Yea, apparently that is the spec as credentials not considered user details can be stored in the software. |
[10:33:22] | <paul121[m]> | Well shoot. It would be nice if the expiration time could be increased for individual clients |
[10:34:25] | <paul121[m]> | Could also explore making it easier to use auth code grant for scripting use cases.. we chatted a bit about that |
[10:34:34] | <paul121[m]> | But hard to make a universal solution I think |
[10:37:08] | <FarmerEd[m]> | What about an module inside farmOS that creates a refresh token that can be copied to systems without browsers? |
[10:39:42] | <paul121[m]> | Yep. Although I was thinking you copy the auth code back out to the other systems |
[10:40:52] | <paul121[m]> | That's interesting tho.. you may be able to make a refresh token manually via PHP code... And trick simple_oauth into using it |
[10:41:42] | <FarmerEd[m]> | Maybe an option to do either depending on use case? |
[10:42:11] | <paul121[m]> | Maybe! |
[12:44:01] | * calbasi[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:02] | * dazinism[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:03] | * spitz234[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:04] | * paul121[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * zackmuma[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * riotmiked[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * donblair[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * EvanKelley[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * mstenta[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * symbioquine[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * scrdcow[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * nzsnowman[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * lauriewayne[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * EricLarese[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * skipper_is[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * FarmerEd[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * lordeddi[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * jgaehring[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * ircwaves[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:05] | * Mo[m]12 has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:11] | * BjrnBrala[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:44:13] | * evered[m] has quit (Quit: Bridge terminating on SIGTERM) |
[12:48:57] | * calbasi[m] has joined #farmos |
[12:58:20] | * dazinism[m] has joined #farmos |
[12:58:20] | * spitz234[m] has joined #farmos |
[12:58:32] | * donblair[m] has joined #farmos |
[12:58:32] | * lauriewayne[m] has joined #farmos |
[12:58:32] | * EricLarese[m] has joined #farmos |
[12:58:32] | * jgaehring[m] has joined #farmos |
[12:58:32] | * zackmuma[m] has joined #farmos |
[12:58:32] | * BjrnBrala[m] has joined #farmos |
[12:58:32] | * mstenta[m] has joined #farmos |
[12:58:32] | * lordeddi[m] has joined #farmos |
[12:58:32] | * Mo[m]1 has joined #farmos |
[12:58:32] | * EvanKelley[m] has joined #farmos |
[12:58:32] | * scrdcow[m] has joined #farmos |
[12:58:32] | * nzsnowman[m] has joined #farmos |
[12:58:32] | * riotmiked[m] has joined #farmos |
[12:58:33] | * evered[m] has joined #farmos |
[12:58:33] | * paul121[m] has joined #farmos |
[12:58:33] | * symbioquine[m] has joined #farmos |
[12:58:33] | * FarmerEd[m] has joined #farmos |
[12:58:33] | * ircwaves[m] has joined #farmos |
[13:58:35] | <mstenta[m]> | paul121: nice work! https://github.com/farmOS/farmOS-map/issues/181 |
[13:58:38] | <mstenta[m]> | what needs to happen in farmOS to leverage this? |
[13:58:41] | <mstenta[m]> | anything? |
[13:58:59] | <paul121[m]> | just a little change :-) https://github.com/farmOS/farmOS/pull/589 |
[14:00:45] | <mstenta[m]> | Oh you got it already! great! |
[16:33:14] | <FarmerEd[m]> | ACTION uploaded an image: (2121KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/LAomTeAQKSS... > |
[16:34:08] | <FarmerEd[m]> | message interface for Telegram to make field observations |
[16:34:12] | <symbioquine[m]> | Cool |
[16:34:44] | <symbioquine[m]> | Tangentially related, I've learned that webm is better than gif in almost every way... |
[16:35:43] | <FarmerEd[m]> | interesting, will have a look at that |
[16:37:08] | <symbioquine[m]> | ACTION uploaded a video: (539KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/TjIPxHWbRMF... > |
[16:37:45] | <symbioquine[m]> | (Maybe not optimal ffmpeg settings - copied from https://stackoverflow.com/questions/48361614/ffmpeg-wont-convert-gif-to-...) |
[16:49:08] | <FarmerEd[m]> | Maybe not optimal ffmpeg settings, adequate enough for the purpose I'd have thought. |
[16:53:17] | <mstenta[m]> | > message interface for Telegram to make field observations |
[16:53:17] | <mstenta[m]> | WHOA! |
[17:00:57] | <FarmerEd[m]> | Maybe it should be voice notes next...... or is talking to farmOS a step too far? |
[17:02:28] | <FarmerEd[m]> | symbioquine: have you a screen recorder that captures webm? |
[17:03:36] | <symbioquine[m]> | https://github.com/phw/peek |
[17:06:17] | <FarmerEd[m]> | Cool, but looks like Linux only |