You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-06 22:42:56 +02:00
Access token forwarding through nginx auth request (#68)
* Access token forwarding through nginx auth request Related to #420. (cherry picked from commitb138872bea
) Signed-off-by: David Holsgrove <david.holsgrove@biarri.com> * Improved documentation for auth request token (cherry picked from commit6fab314f72
) Signed-off-by: David Holsgrove <david.holsgrove@biarri.com> * Update README.md Example should set header as `X-Access-Token` Co-Authored-By: davidholsgrove <davidholsgrove@users.noreply.github.com> * Update Changelog to reference https://github.com/pusher/oauth2_proxy/pull/68 * Fix Changelog message location
This commit is contained in:
committed by
Joel Speed
parent
c83335324e
commit
2280b42f59
@ -880,6 +880,9 @@ func (p *OAuthProxy) Authenticate(rw http.ResponseWriter, req *http.Request) int
|
||||
if session.Email != "" {
|
||||
rw.Header().Set("X-Auth-Request-Email", session.Email)
|
||||
}
|
||||
if p.PassAccessToken && session.AccessToken != "" {
|
||||
rw.Header().Set("X-Auth-Request-Access-Token", session.AccessToken)
|
||||
}
|
||||
}
|
||||
if p.PassAccessToken && session.AccessToken != "" {
|
||||
req.Header["X-Forwarded-Access-Token"] = []string{session.AccessToken}
|
||||
|
Reference in New Issue
Block a user