doesn't sound like a common use case, might be easier to use a transport that moves the header?
- sean On Wed, May 18, 2022, 19:52 'Patrick Kaeding' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Would it be possible to allow the [header that is used]( > https://github.com/golang/oauth2/blob/2e8d9340160224d36fd555eaf8837240a7e239a7/token.go#L80) > by the golang.org/x/oauth2 client to be overridden? > > I imagine the code change would be simple, but would it be accepted? > > My use case is that I have an application that proxies some requests to > another service. Those proxied requests have an authorization header, which > is sent by their client, and identifies who that caller is. My inner > service is the one that I am using the oauth2 library to authenticate with: > > client --API token in authorization header--> outer service --OAuth2 > token--> inner service > > The API token alone is not enough to grant access to the inner service's > resource; only the outer service is authorized to access it. I'm sure I > could change the way we handle the proxied request, but it seems like it > would be useful to make the header customizable. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/be9baa89-98fa-44d7-9389-6e68d8548779n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/be9baa89-98fa-44d7-9389-6e68d8548779n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPoPPOFyomB2pv5ogrtUydbADYCuO_VV5Co%2BczssxLeDxQ%40mail.gmail.com.