mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +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
|
def mid
|
||||||
phone = params[:user][:phone]
|
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"
|
if Rails.env.test? && phone == "123"
|
||||||
@user = ApiUser.find_by(identity_code: "14212128025")
|
@user = ApiUser.find_by(identity_code: "14212128025")
|
||||||
|
@ -119,7 +120,8 @@ class Registrar::SessionsController < Devise::SessionsController
|
||||||
# rubocop: disable Metrics/CyclomaticComplexity
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
# rubocop: disable Metrics/MethodLength
|
# rubocop: disable Metrics/MethodLength
|
||||||
def mid_status
|
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]
|
client.session_code = session[:mid_session_code]
|
||||||
auth_status = client.authentication_status
|
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.
|
# 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.
|
# 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.
|
# You can use `rake secret` to generate a secure secret key.
|
||||||
# Your secret key is used for verifying the integrity of signed cookies.
|
# 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'
|
smtp_authentication: 'plain' # 'plain', 'login', 'cram_md5'
|
||||||
registrant_url: 'https:/registrant.example.com' # for valid email body registrant links
|
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
|
# Autotest config overwrites
|
||||||
test:
|
test:
|
||||||
webclient_ip: '127.0.0.1' # it should match to localhost ip address
|
webclient_ip: '127.0.0.1' # it should match to localhost ip address
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue