Class: VerifyVspClient::FakeSso

Inherits:
Object
  • Object
show all
Defined in:
lib/verify_vsp_client/fake_sso.rb

Overview

A Rack application that can be used in the test suite to simulate the GOV.UK Verify SSO process.

The Rack app responds with a form that when submitted will POST back to ‘callback_path` with a `SAMLResponse` parameter set to `FakeSso::IDENTITY_VERIFIED_SAML_RESPONSE`.

Constant Summary collapse

IDENTITY_VERIFIED_SAML_RESPONSE =
"IDENTITY_VERIFIED_SAML"

Instance Method Summary collapse

Constructor Details

#initialize(callback_path) ⇒ FakeSso

Returns a new instance of FakeSso.



11
12
13
# File 'lib/verify_vsp_client/fake_sso.rb', line 11

def initialize(callback_path)
  @callback_path = callback_path
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
# File 'lib/verify_vsp_client/fake_sso.rb', line 15

def call(env)
  [200, {"Content-Type" => "text/html"}, [identity_verified_form]]
end