Class: Faceauth::Authenticate

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

Class Method Summary collapse

Class Method Details

.login(user, request_uri) ⇒ Object

This method is responsibile for running comparisons between user picture & picture submitted during sign in process. It servers the binary verification result.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/faceauth/authenticate.rb', line 7

def (user, request_uri)
  Findface.api_key = Faceauth.findface_api_key
  begin  
    options = {
      "photo1": request_uri + "#{user.send(Faceauth.).url}",
      "photo2": request_uri + "#{user.send(Faceauth.).url}",
      "threshold": "strict"
    }
    return Findface::Utility.verify options
  rescue Findface::Error => e
    puts e.parsed_response
    puts "\n"
    puts e.message
  end
end