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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44af2213c58fe77a813ac75a01896ccd918b777152bff475896110b495254a81
4
- data.tar.gz: eaf8e02b7b539da7ff68bc8ef8bd939d10d04b665e90928da89b699ae0119cb9
3
+ metadata.gz: e04b3b73068657f16f273595f43eb9888e2914e8b682b7106d835a3ac56b873b
4
+ data.tar.gz: e684b4a052c7d2dce0d87be31bcfedbd195d787dda798ae12e7a6c32fecc8188
5
5
  SHA512:
6
- metadata.gz: 11f5e8b9b574a931feb8c50fdaed19d2a8cf4408c546bf29477dd877b5985e0c878bd993ffd5eb9a252267a1374bcd4d21f04f424f401b5c7bbc74df785af4ce
7
- data.tar.gz: aa9e9c5eee92e58fac2f4e5ecda646cf0600347dd96607aa55188570895522eb1e4be140bf9649a0ad0b1f635ce178360a7fbaa17833c6df374fae17e50e6280
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`, `jwt_account_id`, `jwt_session_id`, `jwt_identity_id` and `jwt_payload`.
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
@@ -4,6 +4,7 @@ services:
4
4
  GITLAB_AUTH_TOKEN: ${GITLAB_AUTH_TOKEN}
5
5
  image: us-east1-docker.pkg.dev/minato-cloud/images/ruby-minato:1.0.0-dev
6
6
  working_dir: /usr/src/api
7
+ command: /bin/sh -c "while sleep 1000; do :; done"
7
8
  volumes:
8
9
  - .:/usr/src/api:z
9
10
  - bundle:/usr/local/bundle
@@ -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' => jwt_identity_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? 'oidc'
25
+ authentication_method?('oidc')
26
26
  end
27
27
 
28
28
  def auth_password?
29
- authentication_method? 'password'
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
 
@@ -3,7 +3,7 @@
3
3
  module Minato
4
4
  module Rails
5
5
  module Auth
6
- VERSION = '0.3.2'
6
+ VERSION = '0.3.3'
7
7
  end
8
8
  end
9
9
  end
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.2
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: 2025-09-26 00:00:00.000000000 Z
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