foobara-auth 0.0.6 → 0.0.7
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/create_user.rb +8 -1
- data/src/register.rb +8 -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: 1aa9644452f2df69c840be3976c4ea0c9b4d7af09ae432a20c98bdb71f87393e
|
4
|
+
data.tar.gz: f28a748760a24e913af0f53d47be631aaaa93394e5747978f2cd22f42048bd3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dad7b1b7193abe3753b6d7f592a1b2fcd5c7c9b229c5025dbc3ecffb645c97c195eb6199a410a9b49fd70e032c05349d298b3fd153a78bebee9862df5da64ff1
|
7
|
+
data.tar.gz: 04a75cf7418015a6399442c2b0cd6244cfd1410b747f49adaa2ca7cf5da03f8c511b4c8caa38bfdf4d849c1edfb5cb270a2edac685475d0185dd0917bee5394c
|
data/CHANGELOG.md
CHANGED
data/src/create_user.rb
CHANGED
@@ -4,6 +4,7 @@ module Foobara
|
|
4
4
|
inputs Types::User.attributes_for_create
|
5
5
|
|
6
6
|
add_inputs do
|
7
|
+
user_id :integer, :allow_nil
|
7
8
|
plaintext_password :string, :sensitive_exposed
|
8
9
|
end
|
9
10
|
|
@@ -24,7 +25,13 @@ module Foobara
|
|
24
25
|
attr_accessor :user
|
25
26
|
|
26
27
|
def create_user
|
27
|
-
|
28
|
+
inputs = self.inputs.except(:user_id, :plaintext_password)
|
29
|
+
|
30
|
+
if user_id
|
31
|
+
inputs[:id] = user_id
|
32
|
+
end
|
33
|
+
|
34
|
+
self.user = Types::User.create(inputs)
|
28
35
|
end
|
29
36
|
|
30
37
|
def password_present?
|
data/src/register.rb
CHANGED
@@ -6,6 +6,7 @@ module Foobara
|
|
6
6
|
depends_on CreateUser, SetPassword
|
7
7
|
|
8
8
|
inputs do
|
9
|
+
user_id :integer, :allow_nil
|
9
10
|
username :string, :required
|
10
11
|
email :email, :allow_nil
|
11
12
|
plaintext_password :string, :allow_nil, :sensitive_exposed
|
@@ -26,7 +27,13 @@ module Foobara
|
|
26
27
|
attr_accessor :user
|
27
28
|
|
28
29
|
def create_user
|
29
|
-
|
30
|
+
inputs = { username:, email: }
|
31
|
+
|
32
|
+
if user_id
|
33
|
+
inputs[:user_id] = user_id
|
34
|
+
end
|
35
|
+
|
36
|
+
self.user = run_subcommand!(CreateUser, inputs)
|
30
37
|
end
|
31
38
|
|
32
39
|
def password?
|
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.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: argon2
|