ravelin 0.1.48 → 0.1.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/password.rb +10 -1
- data/lib/ravelin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c66e6c1b1e8b5ddf58b3cbafcfb16b53e7434d274f837dfcdf585d8b06a648
|
4
|
+
data.tar.gz: c88e34073b60de86fc3d9afb7c376d54fb9a2de1652e11ff003b1a4d58230e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d877af4fa3821cf92de826cf209eb79ba0484e940d66177d80814c2525a56227e68f3e9caae5f9ebd280afa464bfefc9cddf86ba67da7303d6869d64592cf1
|
7
|
+
data.tar.gz: 661788765e818372f7eb520ea925928c0485ba9b05171642af80d100e9c9f9faba465964fdf5ba80deb63ff20c69ec6a12ca372d505674c9ffc7f985e5433a87
|
data/lib/ravelin/password.rb
CHANGED
@@ -2,19 +2,28 @@ require 'digest'
|
|
2
2
|
|
3
3
|
module Ravelin
|
4
4
|
class Password < RavelinObject
|
5
|
-
attr_accessor :success, :failure_reason, :password_hashed
|
5
|
+
attr_accessor :success, :failure_reason, :password_hashed, :emailPasswordSHA256, :passwordSHA1SHA256
|
6
6
|
attr_required :success
|
7
7
|
|
8
8
|
# Alternative interface, because when the attr is called "password_hashed",
|
9
9
|
# the end user might think they need to hash the password themselves
|
10
10
|
def password=(passwd)
|
11
11
|
@password_hashed = Digest::SHA256.hexdigest(passwd)
|
12
|
+
@passwordSHA1SHA256 = Digest::SHA256.hexdigest(Digest::SHA1.hexdigest(passwd))
|
12
13
|
end
|
13
14
|
|
14
15
|
def password_hashed=(passwd)
|
15
16
|
@password_hashed = passwd
|
16
17
|
end
|
17
18
|
|
19
|
+
def emailPassword=(emailPassword)
|
20
|
+
@emailPasswordSHA256 = Digest::SHA256.hexdigest(emailPassword)
|
21
|
+
end
|
22
|
+
|
23
|
+
def passwordSHA1SHA256=(passwd)
|
24
|
+
@passwordSHA1SHA256 = Digest::SHA256.hexdigest(Digest::SHA1.hexdigest(passwd))
|
25
|
+
end
|
26
|
+
|
18
27
|
FAILURE_REASONS = %w(BAD_PASSWORD UNKNOWN_USERNAME AUTHENTICATION_FAILURE INTERNAL_ERROR RATE_LIMIT BANNED_USER)
|
19
28
|
|
20
29
|
def validate
|
data/lib/ravelin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravelin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.49
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|