-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to stub authenticators? #181
Comments
I don't think there is one yet. One solution for this could be that you define a trait with the relevant methods (token(), mainly) that you implement for both Authenticator and your stub type(s). Maybe I'm missing something, but this might just work.At some point we could define this trait in yup-oauth2 itself, but other than convenience it shouldn't make a difference. Let me know what you think!
|
The first part being a trait that would be part of google-apis-rs replacing its direct usage of the Authenticator struct you mean? To be honest having that trait in either place (google-apis-rs or yup-oauth2) seems reasonable to me. Just wasn't sure if there was a "native" way to do this already. I'll fool around with this some and see where I land. |
Ah right, sorry - i didn't have google-apis-rs in the picture. If we add such a trait to yup-oauth2 it definitely needs support from google-apis-rs too, you're right.On Jul 17, 2022 15:29, Eugene Marcotte ***@***.***> wrote:
The first part being a trait that would be part of google-apis-rs replacing its direct usage of the Authenticator struct you mean? To be honest having that trait in either place (google-apis-rs or yup-oauth2) seems reasonable to me. Just wasn't sure if there was a "native" way to do this already.
I'll fool around with this some and see where I land.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been poking around trying to write a local emulator testing scheme for some code against the firestore and pubsub emulators. As others have seen in google-apis-rs (Byron/google-apis-rs#313) authenticators are a required part of the structure.
From what I can see
yup-oauth2/src/authenticator.rs
Lines 688 to 694 in dcc35ac
Is there any mechanism I'm missing where I could pass an authentication flow that doesn't actually request anything from a server or is it something where upstream should be allowing a "no authentication" flow and bypassing yup-oauth?
The text was updated successfully, but these errors were encountered: