< 232022-10-24⋎25 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
14:14paul121[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.
14:14paul121[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.
14:15paul121[m]We also need to get more formal client credentials and auth code grant supper in the client libs
14:18symbioquine[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.
14:18symbioquine[m]>
14:18symbioquine[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.
14:18symbioquine[m]Related: farmos.discourse.group/t/using-farmos-2-
14:18paul121[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.
14:18paul121[m]Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in`
14:20symbioquine[m]symbioquine[m]: That's how I'm currently managing my consumer configurations as code
14:20FarmerEd[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.
14:20FarmerEd[m]> Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in`
14:20FarmerEd[m]Yea, that's pretty much the strategy I've implemented in latest experiments
14:21FarmerEd[m]Gone for expires at (-2min) which is probably overkill
14:23paul121[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?
14:24FarmerEd[m]Client credentials doesn't return a refresh token, so you need the reauthenticate with the same credentials
14:25symbioquine[m]paul121[m]: SSO and one read-only script at the moment
14:25paul121[m]FarmerEd[m]: Oh really?
14:26symbioquine[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.
14:26symbioquine[m]symbioquine[m]: (or on behalf of a human)
14:28paul121[m]And if you needed something robust for multiple users you would use auth code :-)
14:28FarmerEd[m]paul121[m]: Yea, apparently that is the spec as credentials not considered user details can be stored in the software.
14:33paul121[m]Well shoot. It would be nice if the expiration time could be increased for individual clients
14:34paul121[m]Could also explore making it easier to use auth code grant for scripting use cases.. we chatted a bit about that
14:34paul121[m]But hard to make a universal solution I think
14:37FarmerEd[m]What about an module inside farmOS that creates a refresh token that can be copied to systems without browsers?
14:39paul121[m]Yep. Although I was thinking you copy the auth code back out to the other systems
14:40paul121[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
14:41FarmerEd[m]Maybe an option to do either depending on use case?
14:42paul121[m]Maybe!
16:44*calbasi[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*dazinism[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*spitz234[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*paul121[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*zackmuma[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*riotmiked[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*donblair[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*EvanKelley[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*mstenta[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*symbioquine[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*scrdcow[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*nzsnowman[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*lauriewayne[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*EricLarese[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*skipper_is[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*FarmerEd[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*lordeddi[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*jgaehring[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*ircwaves[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*Mo[m]12 has quit (Quit: Bridge terminating on SIGTERM)
16:44*BjrnBrala[m] has quit (Quit: Bridge terminating on SIGTERM)
16:44*evered[m] has quit (Quit: Bridge terminating on SIGTERM)
16:48*calbasi[m] has joined
16:58*dazinism[m] has joined
16:58*spitz234[m] has joined
16:58*donblair[m] has joined
16:58*lauriewayne[m] has joined
16:58*EricLarese[m] has joined
16:58*jgaehring[m] has joined
16:58*zackmuma[m] has joined
16:58*BjrnBrala[m] has joined
16:58*mstenta[m] has joined
16:58*lordeddi[m] has joined
16:58*Mo[m]1 has joined
16:58*EvanKelley[m] has joined
16:58*scrdcow[m] has joined
16:58*nzsnowman[m] has joined
16:58*riotmiked[m] has joined
16:58*evered[m] has joined
16:58*paul121[m] has joined
16:58*symbioquine[m] has joined
16:58*FarmerEd[m] has joined
16:58*ircwaves[m] has joined
17:58mstenta[m]paul121: nice work! github.com/farmOS/farmOS-map/issues/181
17:58mstenta[m]what needs to happen in farmOS to leverage this?
17:58mstenta[m]anything?
17:58paul121[m]just a little change :-) github.com/farmOS/farmOS/pull/589
18:00mstenta[m]Oh you got it already! great!
20:33*uploaded an image: (2121KiB) < libera.ems.host/_matrix/media/v3/downloa >
20:34FarmerEd[m]message interface for Telegram to make field observations
20:34symbioquine[m]Cool
20:34symbioquine[m]Tangentially related, I've learned that webm is better than gif in almost every way...
20:35FarmerEd[m]interesting, will have a look at that
20:37*uploaded a video: (539KiB) < libera.ems.host/_matrix/media/v3/downloa >
20:37symbioquine[m](Maybe not optimal ffmpeg settings - copied from stackoverflow.com/questions/48361614/ffm)
20:49FarmerEd[m]Maybe not optimal ffmpeg settings, adequate enough for the purpose I'd have thought.
20:53mstenta[m]> message interface for Telegram to make field observations
20:53mstenta[m]WHOA!
21:00FarmerEd[m]Maybe it should be voice notes next...... or is talking to farmOS a step too far?
21:02FarmerEd[m]symbioquine: have you a screen recorder that captures webm?
21:03symbioquine[m]github.com/phw/peek
21:06FarmerEd[m]Cool, but looks like Linux only

< 232022-10-24⋏25 >