Class: VerifyVspClient::AuthenticationRequest

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

Overview

SAML Authentication Request used to start the verification user journey.

Use by calling AuthenticationRequest.generate to generate a new authentication request via the Verify Service Provider

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(saml_request:, request_id:, sso_location:) ⇒ AuthenticationRequest

Returns a new instance of AuthenticationRequest.



9
10
11
12
13
# File 'lib/verify_vsp_client/authentication_request.rb', line 9

def initialize(saml_request:, request_id:, sso_location:)
  @saml_request = saml_request
  @request_id = request_id
  @sso_location = sso_location
end

Instance Attribute Details

#request_idObject (readonly)

Returns the value of attribute request_id.



7
8
9
# File 'lib/verify_vsp_client/authentication_request.rb', line 7

def request_id
  @request_id
end

#saml_requestObject (readonly)

Returns the value of attribute saml_request.



7
8
9
# File 'lib/verify_vsp_client/authentication_request.rb', line 7

def saml_request
  @saml_request
end

#sso_locationObject (readonly)

Returns the value of attribute sso_location.



7
8
9
# File 'lib/verify_vsp_client/authentication_request.rb', line 7

def sso_location
  @sso_location
end

Class Method Details

.generateObject



15
16
17
18
19
20
21
22
23
# File 'lib/verify_vsp_client/authentication_request.rb', line 15

def self.generate
  request = VerifyVspClient::ServiceProvider.new.generate_request

  new(
    saml_request: request["samlRequest"],
    request_id: request["requestId"],
    sso_location: request["ssoLocation"]
  )
end