minato-rails-auth 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8604698708e566c6bafcdfb266913b0e2aacbdabb44451212cfab2af34f2583
4
- data.tar.gz: 5a08d876eee74aa03c58dea4893e2dab2d15abe9c4392440a3a6f9ccb2a4ff2d
3
+ metadata.gz: f852d8c8fb4a6ab7e5afa05144de2fcc622ac073e7830fa4f4229d9975941d78
4
+ data.tar.gz: d8ad8fd69b33b1e952c363d9c149dba390f313b1168f0226678e78708efca5b3
5
5
  SHA512:
6
- metadata.gz: 37c6f45719975a70f7fc2ba11b2605d6764d080126281d6cf88d212c575d05f041ed8e41c29ab93045ca9b992711f4c22084795f6ddadabb4b25e4fc21b39f60
7
- data.tar.gz: e36d6abdc74a8e3ec50aace97f9840fbf5210080ed97fffc0dde44f6cf7cc1c397ad89cee7b30dbd19117683eb4739cfe8038f360b4249aca437c8345b078dad
6
+ metadata.gz: 19744e2044ad31a4754435d0df1ab7cdff2233ce5ce8f36ad971ec0dc08544ca3506297ec04e55f5f50f0e5943e19f2bbd12b93633e42e586c34e336e6ff4959
7
+ data.tar.gz: bcbfdec2e4b3b57c914e326e44d7e24490959d356bf838aca0a3a0a764880ba89b7982abe0edce4024502c75118a7bb53d82089628091d5ba7c73d3284e552bb
@@ -20,14 +20,14 @@ module Minato
20
20
  @machine ||= !human?
21
21
  end
22
22
 
23
- def identity_id
24
- return session.identity.id unless impersonated?
23
+ def identity
24
+ return impersonator_identity unless impersonated?
25
25
 
26
- session.identity.metadata_public.impersonated_identity_id
26
+ session.identity.metadata_public.impersonated_identity
27
27
  end
28
28
 
29
- def impersonator_identity_id
30
- session.identity.id
29
+ def impersonator_identity
30
+ session.identity
31
31
  end
32
32
 
33
33
  def subject
@@ -35,7 +35,7 @@ module Minato
35
35
  end
36
36
 
37
37
  def impersonated?
38
- !session.identity.metadata_public&.impersonated_identity_id.nil?
38
+ session.identity.metadata_public&.impersonated_identity.present?
39
39
  end
40
40
 
41
41
  private
@@ -3,7 +3,7 @@
3
3
  module Minato
4
4
  module Rails
5
5
  module Auth
6
- VERSION = '0.2.0'
6
+ VERSION = '0.2.1'
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferreri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport