lib/verify/service_provider.rb
def generate_request
      uri = URI(self.class.generate_request_url)
      request = Net::HTTP::Post.new(uri, {})
      request.content_type = "application/json"
      response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri_uses_ssl?(uri)) { |http| http.request(request) }

      handle_response response.body
    end
# Makes a request to the Verify Service Provider to generate an
# authentication request, as described here:
#
#   https://www.docs.verify.service.gov.uk/get-started/set-up-successful-verification-journey/#generate-an-authentication-request
#
# The authentication request is used to start the identity assurance process
# with Verify.
#
# Returns the authentication request as a Hash, for example:
#
#   {
#     "samlRequest" => "PD94bWwgdmVyc2lvbj0iMS4wIiBlb...",
#     "requestId" => "_f43aa274-9395-45dd-aaef-25f56fe",
#     "ssoLocation" => "https://compliance-tool-reference.ida.digital.cabinet-office.gov.uk/SAML2/SSO"
#   }
#
# Raises Verify::ResponseError if the VSP responds with an error response.
Makes a request to the Verify Service Provider to generate an
authentication request, as described here.



The authentication request is used to start the identity assurance process
with Verify.

Returns the authentication request as a Hash, for example.



Raises Verify::ResponseError if the VSP responds with an error response.
Makes a request to the Verify Service Provider to generate an authentication request as described here . The authentication request is used to start the identity assurance process with Verify . Returns the authentication request as a Hash for example . Raises Verify :: ResponseError if the VSP responds with an error response .
def generate_request
      uri = URI(self.class.generate_request_url)
      request = Net::HTTP::Post.new(uri, {})
      request.content_type = "application/json"
      response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri_uses_ssl?(uri)) { |http| http.request(request) }
      handle_response response.body
    end
def generate_request uri = URI ( self . class . generate_request_url ) request = Net :: HTTP :: Post . new ( uri , { } ) request . content_type = "application/json" response = Net :: HTTP . start ( uri . hostname , uri . port , use_ssl : uri_uses_ssl? ( uri ) ) { | http | http . request ( request ) } handle_response response . body end
Makes a request to the Verify Service Provider to generate an
authentication request, as described here:
Makes a request to the Verify Service Provider to generate an authentication request as described here :