mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Make DigiDocService endpoint configurable
This commit is contained in:
parent
f7a4dee1b6
commit
65b17e06eb
2 changed files with 8 additions and 3 deletions
|
@ -83,7 +83,8 @@ class Registrar::SessionsController < Devise::SessionsController
|
|||
|
||||
def mid
|
||||
phone = params[:user][:phone]
|
||||
client = Rails.env.production? ? Digidoc::Client.new('https://digidocservice.sk.ee') : Digidoc::Client.new
|
||||
endpoint = "#{ENV['sk_digi_doc_service_endpoint']}"
|
||||
client = Digidoc::Client.new(endpoint)
|
||||
|
||||
if Rails.env.test? && phone == "123"
|
||||
@user = ApiUser.find_by(identity_code: "14212128025")
|
||||
|
@ -119,7 +120,8 @@ class Registrar::SessionsController < Devise::SessionsController
|
|||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
# rubocop: disable Metrics/MethodLength
|
||||
def mid_status
|
||||
client = Rails.env.production? ? Digidoc::Client.new('https://digidocservice.sk.ee') : Digidoc::Client.new
|
||||
endpoint = "#{ENV['sk_digi_doc_service_endpoint']}"
|
||||
client = Digidoc::Client.new(endpoint)
|
||||
client.session_code = session[:mid_session_code]
|
||||
auth_status = client.authentication_status
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ legal_documents_dir: 'import/legal_documents'
|
|||
|
||||
# New Relic app name, keep only current mode, remove other names.
|
||||
# Example: 'Admin, EPP, REPP' will have name 'Admin, EPP, REPP - production' at New Relic.
|
||||
new_relic_app_name: 'Admin, EPP, REPP, Registrar, Registrant'
|
||||
new_relic_app_name: 'Admin, EPP, REPP, Registrar, Registrant'
|
||||
|
||||
# You can use `rake secret` to generate a secure secret key.
|
||||
# Your secret key is used for verifying the integrity of signed cookies.
|
||||
|
@ -58,6 +58,9 @@ smtp_enable_starttls_auto: 'true' # 'false'
|
|||
smtp_authentication: 'plain' # 'plain', 'login', 'cram_md5'
|
||||
registrant_url: 'https:/registrant.example.com' # for valid email body registrant links
|
||||
|
||||
# SK DigiDocService
|
||||
sk_digi_doc_service_endpoint: 'https://openxades.org:9443/DigiDocService'
|
||||
|
||||
# Autotest config overwrites
|
||||
test:
|
||||
webclient_ip: '127.0.0.1' # it should match to localhost ip address
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue