Skip to content
Merged
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
32 changes: 15 additions & 17 deletions spec/support/oidc_auth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ def visit_idp_from_ial1_oidc_sp_defaulting_to_aal3(**args)
oidc_path
end

def ial1_params(prompt: nil,
state: SecureRandom.hex,
nonce: SecureRandom.hex,
client_id: OIDC_IAL1_ISSUER,
tid: nil)
def ial1_params(
prompt: nil,
state: SecureRandom.hex,
nonce: SecureRandom.hex,
client_id: OIDC_IAL1_ISSUER
)
ial1_params = {
client_id: client_id,
response_type: 'code',
Expand All @@ -76,18 +77,18 @@ def ial1_params(prompt: nil,
state: state,
nonce: nonce,
}
ial1_params[:tid] = tid if tid
ial1_params[:prompt] = prompt if prompt
ial1_params
end

def ial2_params(prompt: nil,
state: SecureRandom.hex,
nonce: SecureRandom.hex,
client_id: OIDC_ISSUER,
acr_values: Saml::Idp::Constants::IAL2_AUTHN_CONTEXT_CLASSREF,
tid: nil,
biometric_comparison_required: false)
def ial2_params(
prompt: nil,
state: SecureRandom.hex,
nonce: SecureRandom.hex,
client_id: OIDC_ISSUER,
acr_values: Saml::Idp::Constants::IAL2_AUTHN_CONTEXT_CLASSREF,
biometric_comparison_required: false
)
ial2_params = {
client_id: client_id,
response_type: 'code',
Expand All @@ -97,7 +98,6 @@ def ial2_params(prompt: nil,
state: state,
nonce: nonce,
}
ial2_params[:tid] = tid if tid
ial2_params[:prompt] = prompt if prompt
if biometric_comparison_required
ial2_params[:biometric_comparison_required] = 'true'
Expand All @@ -111,8 +111,7 @@ def vtr_params(
state: SecureRandom.hex,
nonce: SecureRandom.hex,
client_id: OIDC_ISSUER,
scope: 'openid email profile:name social_security_number',
tid: nil
scope: 'openid email profile:name social_security_number'
)
vtr_params = {
client_id: client_id,
Expand All @@ -123,7 +122,6 @@ def vtr_params(
state: state,
nonce: nonce,
}
vtr_params[:tid] = tid if tid
vtr_params[:prompt] = prompt if prompt
vtr_params
end
Expand Down