auth_master 0.0.9 → 0.0.10

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: 9894b9c1c29ccefc563ef87b5ed898b3131ca386aea808b0e897cb48b7bb594a
4
- data.tar.gz: 845ddd2fb57afd4a68e653e618dc0b7721fcbd5ccc25b331ca438706ee6df29a
3
+ metadata.gz: f5b595e57c445d5be892deb1a562ffcee119832fc6c13ac8d7787f51701885ca
4
+ data.tar.gz: 9b225df7392f7d2124bfa5f6dfd472095e59f318beab883688c4b09eabd69d00
5
5
  SHA512:
6
- metadata.gz: 87aebed6fcf195cf7e1637377baecc7dc256c6e1520612d0782fbf30a8a49c803c81010ae06378cd0e0d5ea2dfe1b09d8c5f0c5a5f0394496960ff40ea166935
7
- data.tar.gz: b2629378e04e399cf718af1e91419a370f936b335ff2ed1c082b203a1030575ec263bf737dafd7f306607bedd064f8a619a63d2c71c68ffaa9350d642b05f85a
6
+ metadata.gz: 4a038fe71e626f995c536808eeebd4aab5e68aa365ed1940f5d013227e411879ec155ff1d8a069dd63d91e2fe18616ab11e5f39b6ce2c9c568675a0ca2e9a59b
7
+ data.tar.gz: fcd4fc93039ac69c689d00e83aa1bf830ee442f27e1ea05d162146071a1393db553f9e4af0d89ec562c64e76c683cc54e06f4b22a58e6f69d33821a9746278df
@@ -21,6 +21,7 @@ module AuthMaster::CurrentConcern
21
21
  return if !target.persisted?
22
22
 
23
23
  uuid = auth_master_session_id_generator
24
+ target_class = target.respond_to?(:auth_master_config_class) ? target.auth_master_config_class : target.class
24
25
  session[auth_master_session_key(target.class)] = uuid
25
26
 
26
27
  AuthMaster::PrepareTokenOperation.call!(target, uuid:, purpose:)
@@ -35,7 +36,7 @@ module AuthMaster::CurrentConcern
35
36
  session.delete(auth_master_session_key(target_class))
36
37
  session[auth_master_target_session_key(target_class)] = auth_master_session.id
37
38
 
38
- true
39
+ auth_master_session.target
39
40
  end
40
41
 
41
42
  def auth_master_login_as!(target)
@@ -32,7 +32,8 @@ module AuthMaster
32
32
  return target if target.is_a? Symbol
33
33
  return target.to_sym if target.is_a? String
34
34
 
35
- target.class.to_s.underscore.to_sym
35
+ target_class_name = target.respond_to?(:auth_master_config_class) ? target.auth_master_config_class : target.class
36
+ target_class_name.to_s.underscore.to_sym
36
37
  end
37
38
 
38
39
  def config_for(target, name)
@@ -1,3 +1,3 @@
1
1
  module AuthMaster
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - vickodin
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-17 00:00:00.000000000 Z
10
+ date: 2025-05-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails