11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/is/parse.rb', line 11
def is_parse_user(options = {})
is_parse(options)
storage_names[:default] = "_User"
property :username, Property::String, unique: true
property :password, Property::String
property :email, Property::String, format: :email_address
class << self
def authenticate(username, password)
result = repository.adapter.sign_in(username, password)
get(result["objectId"])
rescue ::Parse::ParseError
nil
end
def request_password_reset(email)
repository.adapter.request_password_reset email
end
end
end
|