Revert "Registry 663"

This commit is contained in:
Timo Võhmar 2018-02-01 16:15:45 +02:00 committed by GitHub
parent 7ed42b6e82
commit 1690f49575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 165 additions and 308 deletions

View file

@ -31,6 +31,12 @@ class Registrant::SessionsController < Devise::SessionsController
client = Digidoc::Client.new(endpoint)
client.logger = Rails.application.config.logger unless Rails.env.test?
if Rails.env.test? && phone == "123"
@user = ApiUser.find_by(identity_code: "14212128025")
sign_in(@user, event: :authentication)
return redirect_to registrant_root_url
end
# country_codes = {'+372' => 'EST'}
response = client.authenticate(
phone: "+372#{phone}",