Class: Faceauth::Authenticate
- Inherits:
-
Object
- Object
- Faceauth::Authenticate
- Defined in:
- lib/faceauth/authenticate.rb
Class Method Summary collapse
-
.login(user, request_uri) ⇒ Object
This method is responsibile for running comparisons between user picture & picture submitted during sign in process.
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 login(user, request_uri) Findface.api_key = Faceauth.findface_api_key begin = { "photo1": request_uri + "#{user.send(Faceauth.signup_picture_column).url}", "photo2": request_uri + "#{user.send(Faceauth.signin_picture_column).url}", "threshold": "strict" } return Findface::Utility.verify rescue Findface::Error => e puts e.parsed_response puts "\n" puts e. end end |