mirror of
https://github.com/zitadel/oidc.git
synced 2026-05-01 07:29:43 -05:00
Merge branch 'fix-header-map' into work
This commit is contained in:
@@ -428,7 +428,8 @@ func TestTryErrorRedirect(t *testing.T) {
|
||||
parent: oidc.ErrInteractionRequired().WithDescription("sign in"),
|
||||
},
|
||||
want: &Redirect{
|
||||
URL: "http://example.com/callback?error=interaction_required&error_description=sign+in&state=state1",
|
||||
Header: make(http.Header),
|
||||
URL: "http://example.com/callback?error=interaction_required&error_description=sign+in&state=state1",
|
||||
},
|
||||
wantLog: `{
|
||||
"level":"WARN",
|
||||
|
||||
+6
-2
@@ -218,7 +218,8 @@ type Response struct {
|
||||
// without custom headers.
|
||||
func NewResponse(data any) *Response {
|
||||
return &Response{
|
||||
Data: data,
|
||||
Header: make(http.Header),
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +243,10 @@ type Redirect struct {
|
||||
}
|
||||
|
||||
func NewRedirect(url string) *Redirect {
|
||||
return &Redirect{URL: url}
|
||||
return &Redirect{
|
||||
Header: make(http.Header),
|
||||
URL: url,
|
||||
}
|
||||
}
|
||||
|
||||
func (red *Redirect) writeOut(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user