Skip to content

Commit

Permalink
consent: Add login_challenge and login_session_id to the get consent …
Browse files Browse the repository at this point in the history
…response

Signed-off-by: Joao Cardoso <mail@joao-carlos.com>
  • Loading branch information
jcxplorer committed Oct 22, 2018
1 parent bbc4020 commit dda5af2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions consent/manager_test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,5 @@ func compareConsentRequest(t *testing.T, a, b *ConsentRequest) {
assert.EqualValues(t, a.RequestURL, b.RequestURL)
assert.EqualValues(t, a.CSRF, b.CSRF)
assert.EqualValues(t, a.Skip, b.Skip)
assert.EqualValues(t, a.LoginChallenge, b.LoginChallenge)
}
2 changes: 2 additions & 0 deletions consent/sql_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ func (s *sqlConsentRequest) toConsentRequest(client *client.Client) (*ConsentReq
ForceSubjectIdentifier: s.ForcedSubjectIdentifier,
RequestedAt: s.RequestedAt,
WasHandled: s.WasHandled,
LoginSessionID: s.LoginSessionID,
LoginChallenge: s.LoginChallenge,
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions consent/sql_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ func TestSQLConsentConverter(t *testing.T) {
Verifier: "verifier",
CSRF: "csrf",
AuthenticatedAt: time.Now().UTC().Add(-time.Minute),
LoginChallenge: "login-challenge",
LoginSessionID: "login-session-id",
}

b := &HandledConsentRequest{
Expand Down

0 comments on commit dda5af2

Please sign in to comment.