Add redirect capability to sign_out (#314)
* addint redirect capability to sign_out * updating changelog
This commit is contained in:
		
							parent
							
								
									68abf7b2d8
								
							
						
					
					
						commit
						ca0b8375da
					
				|  | @ -15,6 +15,7 @@ | |||
| - [#300](https://github.com/pusher/oauth2_proxy/pull/300) Added userinfo endpoint (@kbabuadze) | ||||
| - [#309](https://github.com/pusher/oauth2_proxy/pull/309) Added support for custom CA when connecting to Redis cache (@lleszczu) | ||||
| - [#248](https://github.com/pusher/oauth2_proxy/pull/248) Fix issue with X-Auth-Request-Redirect header being ignored (@webnard) | ||||
| - [#314](https://github.com/pusher/oauth2_proxy/pull/314) Add redirect capability to sign_out (@costelmoraru) | ||||
| - [#265](https://github.com/pusher/oauth2_proxy/pull/265) Add upstream with static response (@cgroschupp) | ||||
| 
 | ||||
| # v4.0.0 | ||||
|  |  | |||
|  | @ -620,8 +620,14 @@ func (p *OAuthProxy) UserInfo(rw http.ResponseWriter, req *http.Request) { | |||
| 
 | ||||
| // SignOut sends a response to clear the authentication cookie
 | ||||
| func (p *OAuthProxy) SignOut(rw http.ResponseWriter, req *http.Request) { | ||||
| 	redirect, err := p.GetRedirect(req) | ||||
| 	if err != nil { | ||||
| 		logger.Printf("Error obtaining redirect: %s", err.Error()) | ||||
| 		p.ErrorPage(rw, 500, "Internal Error", err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	p.ClearSessionCookie(rw, req) | ||||
| 	http.Redirect(rw, req, "/", 302) | ||||
| 	http.Redirect(rw, req, redirect, 302) | ||||
| } | ||||
| 
 | ||||
| // OAuthStart starts the OAuth2 authentication flow
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue