Skip to content

Provide convenient access to getting a Google access token #3049

@jroper

Description

@jroper

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions