Class: VerifyVspClient::Response
- Inherits:
-
Object
- Object
- VerifyVspClient::Response
- Defined in:
- lib/verify_vsp_client/response.rb
Overview
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")
Defined Under Namespace
Classes: MissingResponseAttribute
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parameters) ⇒ Response
constructor
A new instance of Response.
- #scenario ⇒ Object
- #verified? ⇒ Boolean
Constructor Details
#initialize(parameters) ⇒ Response
Returns a new instance of Response.
13 14 15 |
# File 'lib/verify_vsp_client/response.rb', line 13 def initialize(parameters) @parameters = parameters end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
11 12 13 |
# File 'lib/verify_vsp_client/response.rb', line 11 def parameters @parameters end |
Class Method Details
.translate(saml_response:, request_id:, level_of_assurance:) ⇒ Object
17 18 19 20 |
# 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 |
Instance Method Details
#scenario ⇒ Object
26 27 28 |
# File 'lib/verify_vsp_client/response.rb', line 26 def scenario @scenario ||= parameters["scenario"] end |
#verified? ⇒ Boolean
22 23 24 |
# File 'lib/verify_vsp_client/response.rb', line 22 def verified? scenario == VerifyVspClient::IDENTITY_VERIFIED_SCENARIO end |