Class: InheritedProofing::Logingov::Service
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- InheritedProofing::Logingov::Service
- Defined in:
- lib/inherited_proofing/logingov/service.rb
Overview
This class interacts with Login.gov to create an inherited proofing user.
Constant Summary collapse
- SCOPE =
'profile email openid social_security_number'
Instance Method Summary collapse
-
#render_auth(auth_code:) ⇒ Object
makes an auth call to Login.gov with an inherited_proofing_auth param Login.gov will pass this param back for validation in their user attributes call.
Methods inherited from Common::Client::Base
configuration, #raise_backend_exception
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Instance Method Details
#render_auth(auth_code:) ⇒ Object
makes an auth call to Login.gov with an inherited_proofing_auth param Login.gov will pass this param back for validation in their user attributes call
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/inherited_proofing/logingov/service.rb', line 15 def render_auth(auth_code:) renderer = ActionController::Base.renderer renderer.controller.prepend_view_path(Rails.root.join('lib', 'inherited_proofing', 'logingov', 'templates')) renderer.render(template: 'oauth_get_form', locals: { url: auth_url, params: { acr_values: IAL::LOGIN_GOV_IAL2, client_id: config.client_id, nonce:, prompt: config.prompt, redirect_uri: config.redirect_uri, response_type: config.response_type, scope: SCOPE, state: SecureRandom.hex, inherited_proofing_auth: auth_code } }, format: :html) end |