mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
Added birthday ident verification
This commit is contained in:
parent
34da6f250d
commit
55848e1000
5 changed files with 41 additions and 17 deletions
|
@ -17,7 +17,7 @@ module Eeid
|
|||
return render_invalid_signature unless valid_hmac_signature?(request.headers['X-HMAC-Signature'])
|
||||
|
||||
contact = Contact.find_by_code(permitted_params[:reference])
|
||||
poi = catch_poi
|
||||
poi = catch_poi(contact)
|
||||
verify_contact(contact)
|
||||
inform_registrar(contact, poi)
|
||||
render json: { status: 'success' }, status: :ok
|
||||
|
@ -55,8 +55,8 @@ module Eeid
|
|||
end
|
||||
end
|
||||
|
||||
def catch_poi
|
||||
ident_service = Eeid::IdentificationService.new
|
||||
def catch_poi(contact)
|
||||
ident_service = Eeid::IdentificationService.new(contact.ident_type)
|
||||
response = ident_service.get_proof_of_identity(permitted_params[:identification_request_id])
|
||||
raise StandardError, response[:error] if response[:error].present?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue