Skip to content
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

Provide convenient access to getting a Google access token #3049

Open
jroper opened this issue Jan 10, 2024 · 0 comments
Open

Provide convenient access to getting a Google access token #3049

jroper opened this issue Jan 10, 2024 · 0 comments

Comments

@jroper
Copy link

jroper commented Jan 10, 2024

In a project where you're already using Alpakka to access Google services, you may want to get an access token directly, for accessing Google services in a way that Alpakka doesn't support. For example, you might want to access GKE using a Google OAuth token, and the library you're using might not accept a generic map of headers to authenticate with, but rather requires explicitly passing an access token.

Currently, it's possible to get access to an access token created by Alpakka by invoking the getRequestMetadata method, looking for the Authorization header in the returned map, and stripping Bearer from the value. There could be more convenient ways to get this, but right now Alpakka makes every method that could be used private. I think it would be convenient if Alpakka provided a public means to get a future of its currently cached access token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants