Class: ProveUru::Authenticate

Inherits:
Object
  • Object
show all
Defined in:
lib/prove_uru/authenticate.rb

Class Method Summary collapse

Class Method Details

.process(profile_id, user_data, uk_data) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/prove_uru/authenticate.rb', line 2

def self.process(profile_id, user_data, uk_data)
  client = ProveUru.create_client
  
  response = client.request :prove, :authenticate_by_profile do
    soap.body = ProveUru.merge_prove_password_hash({
      "ProfileId" => profile_id,
      "UserData" => {
        "Basic" => user_data.to_prove_hash,
        "UKData" => uk_data.to_prove_hash
      }
    })
  end
  
  response = response.to_hash
  ::ProveUru::AuthenticationResult.new(response[:authenticate_by_profile_response][:authenticate_by_profile_result])
end