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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec416a90f775b81c196934c7e9db2dfb4b8da390dc2133c737a889ef5aaacede
4
- data.tar.gz: 0b24c1e2b94652a74e8bb27eacafabfffe6141022b86b1e233b566ed3feec4ae
3
+ metadata.gz: 868223dc8a31d7809c6171e29ad115f95c0ac94492a0c3c0bd796018c7bb7381
4
+ data.tar.gz: 7fe650602a7e14240beab2bdbb1a38f9d756947fd5e8c4fe77a665fc00abed8d
5
5
  SHA512:
6
- metadata.gz: 51e2a3098e111be28f582c9870e525840d769d3ae617918364b51a65ae122674b19fcaca27e140d16364cf1550549b07422a9f9480d32cebfa4f132b23259eaa
7
- data.tar.gz: 634134b416bdcd9c97f21ad7fabfeaadfe04851cd7fe28226664d5ef6af23c43d03ec44f575605d25699b7d849629964a4c33fa47b16d0616016afd3a2e742d5
6
+ metadata.gz: 1779710b7f67ab3982b4c06875bc60c91068efd1e1ad0a7393c0da3a881006b5a725ffdee15233d8e5cf6c1d376ec3fdacb5ad944c4cf5e99b61bc1878f65ae1
7
+ data.tar.gz: 124db35580d5409e11d59a418db86c5bd630601ef465f49ee9c21320ffb3a5c3230f8b71fe734efa341fa1439e58a15509cd0945e8ae38ed40a09a20dc18f62a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.0] - 2025-08-22
2
+
3
+ - Mark as compatible with Foobara 0.1.0
4
+
1
5
  ## [0.0.13] - 2025-05-13
2
6
 
3
7
  - Allow logout to work even if refresh token is deleted/invalid
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.errors.first.is_a?(FindUser::UserNotFoundError) &&
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)
@@ -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
- valid_password?
19
+ is_valid_password
20
20
  end
21
21
 
22
- attr_accessor :valid_password
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.valid_password = if hashed_secret
32
- run_subcommand!(VerifySecret, secret: plaintext_password, hashed_secret:)
33
- end
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
- verified?
16
+ is_verified
17
17
  end
18
18
 
19
- attr_accessor :verified
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.verified = Argon2::Password.verify_password(secret, hashed_secret)
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.13
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: 2025-05-14 00:00:00.000000000 Z
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.1
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.1
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.2
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: []