minato-rails-auth 0.3.2 → 0.3.3
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/.ruby-version +1 -0
- data/README.md +1 -1
- data/compose.yml +1 -0
- data/lib/minato/rails/auth/jwt/spec/contexts.rb +2 -6
- data/lib/minato/rails/auth/user.rb +2 -10
- data/lib/minato/rails/auth/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e04b3b73068657f16f273595f43eb9888e2914e8b682b7106d835a3ac56b873b
|
|
4
|
+
data.tar.gz: e684b4a052c7d2dce0d87be31bcfedbd195d787dda798ae12e7a6c32fecc8188
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31601b1294c6ea5b6651c1a52605a8b6a19c49729ac3363185e0e15f83372e12e4a463803a1c0ec9e810a76b6606d5c21c5415a40970101adb8bb8b8b2d2e73b
|
|
7
|
+
data.tar.gz: e43a996321ebf0d1a53f1d7d74b2371d14745a71c2d34b5083c01e3053dc60fe801827f6c4f84be92f826d8a0aceced8116fbd3d3d243a8a818d6885f6462182
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby-3.2.2
|
data/README.md
CHANGED
|
@@ -122,7 +122,7 @@ And now it will be available the following shared contexts, that you can use fol
|
|
|
122
122
|
- `with jwt authentication`:
|
|
123
123
|
- Just create a jwt with empty payload. To set the payload you should create a `jwt_payload` variable using `let`.
|
|
124
124
|
- `with human jwt authentication`:
|
|
125
|
-
- Creates a jwt with human payload. You set the user attributes with variables `jwt_email`, `
|
|
125
|
+
- Creates a jwt with human payload. You set the user attributes with variables `jwt_email`, `jwt_session_id`, `jwt_identity_id` and `jwt_payload`.
|
|
126
126
|
- `with machine jwt authentication`:
|
|
127
127
|
- Creates a jwt with machine payload. You can set the machine name with the variable `jwt_machine`.
|
|
128
128
|
- `with missing jwt authentication`:
|
data/compose.yml
CHANGED
|
@@ -17,7 +17,6 @@ module Minato
|
|
|
17
17
|
|
|
18
18
|
RSpec.shared_context 'with human jwt authentication', shared_context: :metadata do
|
|
19
19
|
let(:jwt_email) { 'test@email.com' }
|
|
20
|
-
let(:jwt_account_id) { '555' }
|
|
21
20
|
let(:jwt_session_id) { '67cf621f-4f49-4ca5-9365-62520849170b' }
|
|
22
21
|
let(:jwt_identity_id) { 'adb1e688-17c0-4241-bc24-912fa6b5f6c3' }
|
|
23
22
|
let(:jwt_authentication_method) { 'password' }
|
|
@@ -37,12 +36,9 @@ module Minato
|
|
|
37
36
|
'expires_at' => '2021-09-29T20:15:44.731576Z',
|
|
38
37
|
'authentication_methods' => jwt_authentication_methods,
|
|
39
38
|
'identity' => {
|
|
40
|
-
'id'
|
|
41
|
-
'traits'
|
|
39
|
+
'id' => jwt_identity_id,
|
|
40
|
+
'traits' => {
|
|
42
41
|
'email' => jwt_email
|
|
43
|
-
},
|
|
44
|
-
'metadata_public' => {
|
|
45
|
-
'account_id' => jwt_account_id
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
}
|
|
@@ -22,11 +22,11 @@ module Minato
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def auth_sso?
|
|
25
|
-
authentication_method?
|
|
25
|
+
authentication_method?('oidc')
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def auth_password?
|
|
29
|
-
authentication_method?
|
|
29
|
+
authentication_method?('password')
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def auth_provider
|
|
@@ -35,14 +35,6 @@ module Minato
|
|
|
35
35
|
authentication_method('oidc')['provider']
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def collaborator?
|
|
39
|
-
human? && auth_provider == 'grupoangelus'
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def customer?
|
|
43
|
-
!collaborator?
|
|
44
|
-
end
|
|
45
|
-
|
|
46
38
|
def identity
|
|
47
39
|
return nil if machine?
|
|
48
40
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minato-rails-auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ferreri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -49,6 +49,7 @@ files:
|
|
|
49
49
|
- ".devcontainer/docker-compose.yml"
|
|
50
50
|
- ".rspec"
|
|
51
51
|
- ".rubocop.yml"
|
|
52
|
+
- ".ruby-version"
|
|
52
53
|
- README.md
|
|
53
54
|
- Rakefile
|
|
54
55
|
- compose.yml
|