chore: synchronize workspaces

This commit is contained in:
aeneasr 2023-10-27 11:57:55 +02:00
parent 4df21fdf76
commit 3a372fdea2
No known key found for this signature in database
GPG Key ID: 1A463E422E5E2222
2 changed files with 5 additions and 3 deletions

View File

@ -266,7 +266,7 @@ func TestValidateCsrfSession(t *testing.T) {
assert.NoError(t, err, "failed to save cookie %s", c.name)
}
err := ValidateCsrfSession(r, config, store, name, tc.csrfValue)
err := ValidateCsrfSession(r, config, store, name, tc.csrfValue, nil)
if tc.expectError {
assert.Error(t, err)
} else {

View File

@ -295,9 +295,11 @@ func (f *Flow) HandleLoginRequest(h *consent.HandledLoginRequest) error {
f.LoginExtendSessionLifespan = h.ExtendSessionLifespan
f.ACR = h.ACR
f.AMR = h.AMR
if h.Context == nil {
if len(h.Context) > 0 {
f.Context = h.Context
}
f.LoginWasUsed = h.WasHandled
f.LoginAuthenticatedAt = h.AuthenticatedAt
return nil
@ -390,7 +392,7 @@ func (f *Flow) HandleConsentRequest(r *consent.AcceptOAuth2ConsentRequest) error
f.ConsentWasHandled = r.WasHandled
f.ConsentError = r.Error
if r.Context != nil {
if len(r.Context) > 0 {
f.Context = r.Context
}