class VerifyVspClient::Response

Represents a Response from a Verify authentication attempt.

Use by calling VerifyVspClient::Response.translate to translate a SAML response using the Verify Service Provider, for example:

VerifyVspClient::Response.translate(saml_response: "SOME SAML", request_id: "REQUEST_ID", level_of_assurance: "LEVEL_2")

Attributes

parameters[R]

Public Class Methods

new(parameters) click to toggle source
# File lib/verify_vsp_client/response.rb, line 13
def initialize(parameters)
  @parameters = parameters
end
translate(saml_response:, request_id:, level_of_assurance:) click to toggle source
# File lib/verify_vsp_client/response.rb, line 17
def self.translate(saml_response:, request_id:, level_of_assurance:)
  parameters = VerifyVspClient::ServiceProvider.new.translate_response(saml_response, request_id, level_of_assurance)
  new(parameters)
end

Public Instance Methods

scenario() click to toggle source
# File lib/verify_vsp_client/response.rb, line 26
def scenario
  @scenario ||= parameters["scenario"]
end
verified?() click to toggle source
# File lib/verify_vsp_client/response.rb, line 22
def verified?
  scenario == VerifyVspClient::IDENTITY_VERIFIED_SCENARIO
end