Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/forms/openid_connect_authorize_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def extra_analytics_attributes
unauthorized_scope: @unauthorized_scope,
code_digest: code ? Digest::SHA256.hexdigest(code) : nil,
code_challenge_present: code_challenge.present?,
service_provider_pkce: service_provider&.pkce,
}
end

Expand Down
1 change: 1 addition & 0 deletions app/forms/openid_connect_token_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def extra_analytics_attributes
user_id: identity&.user&.uuid,
code_digest: code ? Digest::SHA256.hexdigest(code) : nil,
code_verifier_present: code_verifier.present?,
service_provider_pkce: service_provider&.pkce,
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/1',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid')
expect(@analytics).to receive(:track_event).
with('OpenID Connect: authorization request handoff',
Expand Down Expand Up @@ -130,6 +131,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/2',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid profile')
expect(@analytics).to receive(:track_event).
with('OpenID Connect: authorization request handoff',
Expand Down Expand Up @@ -293,6 +295,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/0',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid profile')
expect(@analytics).to receive(:track_event).
with('OpenID Connect: authorization request handoff',
Expand Down Expand Up @@ -344,6 +347,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/0',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid profile')
expect(@analytics).to receive(:track_event).
with('OpenID Connect: authorization request handoff',
Expand Down Expand Up @@ -396,6 +400,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/0',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid profile')
expect(@analytics).to receive(:track_event).
with('OpenID Connect: authorization request handoff',
Expand Down Expand Up @@ -485,6 +490,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/1',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid')
expect(@analytics).to_not receive(:track_event).with('SP redirect initiated')

Expand Down Expand Up @@ -517,6 +523,7 @@
user_fully_authenticated: true,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/1',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid')
expect(@analytics).to_not receive(:track_event).with('SP redirect initiated')

Expand Down Expand Up @@ -579,6 +586,7 @@
user_fully_authenticated: false,
acr_values: 'http://idmanagement.gov/ns/assurance/ial/1',
code_challenge_present: false,
service_provider_pkce: nil,
scope: 'openid')

action
Expand Down
2 changes: 2 additions & 0 deletions spec/controllers/openid_connect/token_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
errors: {},
code_digest: kind_of(String),
code_verifier_present: false,
service_provider_pkce: nil,
})
action
end
Expand Down Expand Up @@ -87,6 +88,7 @@
errors: hash_including(:grant_type),
code_digest: kind_of(String),
code_verifier_present: false,
service_provider_pkce: nil,
error_details: hash_including(:grant_type),
})

Expand Down
2 changes: 2 additions & 0 deletions spec/forms/openid_connect_authorize_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
scope: 'openid',
code_digest: nil,
code_challenge_present: false,
service_provider_pkce: nil,
)
end
end
Expand All @@ -74,6 +75,7 @@
scope: 'openid',
code_digest: nil,
code_challenge_present: false,
service_provider_pkce: nil,
)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/forms/openid_connect_token_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
user_id: user.uuid,
code_digest: Digest::SHA256.hexdigest(code),
code_verifier_present: false,
service_provider_pkce: nil,
)
end
end
Expand Down