Skip to content

golang/oauth2/stsexchange: pass partial client authentification info #739

Open
@olefirenque

Description

@olefirenque

Hi!
I chose oauth2/google/externalaccount package as the basis for my implementation of token-exchange grant-type on the client side.
As I see it, this token exchange configuration supports providing a ClientID:

But it is only used in conjunction with ClientSecret, which is not required for my use, because the SubjectToken itself is used to authenticate the user:

if c.ClientID == "" || c.ClientSecret == "" || values == nil || headers == nil {

In my use case, the verified ClientID is extracted from the SubjectToken, but I would like to provide the unverified ClientID as a parameter to use for ratelimiting/metric export purposes, etc.

Is it possible to weaken this check to allow only the ClientID to be specified? Or is there a better way to provide this information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions