Closed hunterowens closed 5 years ago
IIRC this one was pretty straightforward following these docs. We're not bothering with the refresh token and just request a new token every time. Is that bad?
Probably not helpful, but here's where we do auth stuff in our code that actually gets mds data: https://github.com/cityofaustin/transportation-dockless-processing/blob/77965ad424d6382149c0fbdca8a4be0f4d788821/get_data.py#L197
Ah I see y'all are mixing in classes for provider-specific auth. Cool. That's more transparent than what we're doing, which is putting the auth params in a secrets.py
config. Because these are just flavors of oauth with slightly different payload params, our approach is less fuss handling the provider nuances, but it's also hidden because it's in a secret config.
Maybe refactor OAuthClientCredentialsAuth
to handle an arbitrary payload, and define the provider-specific auth payloads as mix ins?
yeah. I dunno. @thekaveman do you have strong feelings? I suspect John and I feel this pain point more with 8+ operators vs 4. Happy to architect and fix as needed.
@hunterowens I'm OK with an approach like this until we figure out a more permanent solution.
You sure this works though? I don't see where that mixin is.. mixed in?
Would love your thoughts on how to best architect this, currently testing rn.