foobara-auth 0.0.13 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/src/login.rb +1 -1
- data/src/verify_password.rb +5 -9
- data/src/verify_secret.rb +3 -7
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 868223dc8a31d7809c6171e29ad115f95c0ac94492a0c3c0bd796018c7bb7381
|
4
|
+
data.tar.gz: 7fe650602a7e14240beab2bdbb1a38f9d756947fd5e8c4fe77a665fc00abed8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1779710b7f67ab3982b4c06875bc60c91068efd1e1ad0a7393c0da3a881006b5a725ffdee15233d8e5cf6c1d376ec3fdacb5ad944c4cf5e99b61bc1878f65ae1
|
7
|
+
data.tar.gz: 124db35580d5409e11d59a418db86c5bd630601ef465f49ee9c21320ffb3a5c3230f8b71fe734efa341fa1439e58a15509cd0945e8ae38ed40a09a20dc18f62a
|
data/CHANGELOG.md
CHANGED
data/src/login.rb
CHANGED
@@ -53,7 +53,7 @@ module Foobara
|
|
53
53
|
rescue Halt
|
54
54
|
# I'm a bit nervous about rescuing Halt and clearing the errors, but I'm more nervous bout
|
55
55
|
# introducing a #run_subcommand method.
|
56
|
-
if error_collection.size == 1 && error_collection.
|
56
|
+
if error_collection.size == 1 && error_collection.first.is_a?(FindUser::UserNotFoundError) &&
|
57
57
|
username_or_email.include?("@")
|
58
58
|
error_collection.clear
|
59
59
|
self.user_to_login = run_subcommand!(FindUser, email: username_or_email)
|
data/src/verify_password.rb
CHANGED
@@ -16,21 +16,17 @@ module Foobara
|
|
16
16
|
# TODO: result in error if no password set yet?
|
17
17
|
check_for_valid_password
|
18
18
|
|
19
|
-
|
19
|
+
is_valid_password
|
20
20
|
end
|
21
21
|
|
22
|
-
attr_accessor :
|
23
|
-
|
24
|
-
def valid_password?
|
25
|
-
!!valid_password
|
26
|
-
end
|
22
|
+
attr_accessor :is_valid_password
|
27
23
|
|
28
24
|
def check_for_valid_password
|
29
25
|
hashed_secret = user.password_secret.hashed_secret
|
30
26
|
|
31
|
-
self.
|
32
|
-
|
33
|
-
|
27
|
+
self.is_valid_password = if hashed_secret
|
28
|
+
run_subcommand!(VerifySecret, secret: plaintext_password, hashed_secret:)
|
29
|
+
end
|
34
30
|
end
|
35
31
|
end
|
36
32
|
end
|
data/src/verify_secret.rb
CHANGED
@@ -13,17 +13,13 @@ module Foobara
|
|
13
13
|
def execute
|
14
14
|
verify_secret_against_hashed_secret
|
15
15
|
|
16
|
-
|
16
|
+
is_verified
|
17
17
|
end
|
18
18
|
|
19
|
-
attr_accessor :
|
20
|
-
|
21
|
-
def verified?
|
22
|
-
!!verified
|
23
|
-
end
|
19
|
+
attr_accessor :is_verified
|
24
20
|
|
25
21
|
def verify_secret_against_hashed_secret
|
26
|
-
self.
|
22
|
+
self.is_verified = Argon2::Password.verify_password(secret, hashed_secret)
|
27
23
|
end
|
28
24
|
end
|
29
25
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: argon2
|
@@ -41,16 +41,22 @@ dependencies:
|
|
41
41
|
name: foobara
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - "
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.1.1
|
47
|
+
- - "<"
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.0
|
49
|
+
version: 2.0.0
|
47
50
|
type: :runtime
|
48
51
|
prerelease: false
|
49
52
|
version_requirements: !ruby/object:Gem::Requirement
|
50
53
|
requirements:
|
51
|
-
- - "
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.1.1
|
57
|
+
- - "<"
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0
|
59
|
+
version: 2.0.0
|
54
60
|
email:
|
55
61
|
- azimux@gmail.com
|
56
62
|
executables: []
|
@@ -112,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
118
|
- !ruby/object:Gem::Version
|
113
119
|
version: '0'
|
114
120
|
requirements: []
|
115
|
-
rubygems_version: 3.6.
|
121
|
+
rubygems_version: 3.6.9
|
116
122
|
specification_version: 4
|
117
123
|
summary: Provides various auth domain commands and models
|
118
124
|
test_files: []
|