warden-auth0 0.2.0 → 0.3.0

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: 37731f848d70bcbb50ae044f5b36b784af7d5588493164133212b886c8fac6f8
4
- data.tar.gz: fce5230a7893cf935801b4d6681cb2b564dad1848d49a226d97c368de802cba0
3
+ metadata.gz: 939379a82913caa0c5060cc39aae03e29d9c6e47c3eb1d719991c8fc081852cb
4
+ data.tar.gz: 1b6f48e30e6dcb001391006609da801a0558811893a8545ebf00699bf03c18d4
5
5
  SHA512:
6
- metadata.gz: 94e9c3a5c1a7b1247121dcfdb1f22c4bb3daad043168f0040a59d12d1367a1a5301d6fe7ffd6f7923169fc12b97b1cd8b51ad56529f6686a77409a26c45791d9
7
- data.tar.gz: 53c67aecae629bb63556ebdd9eeca868ffcb9303b9dceff5d20a676d0d06fe79b1e8ba1c3b4e2102cb6fc90c87b248f12ac385f34295a380e3d970c8eb7fc17e
6
+ metadata.gz: c2a20ac41090ed49a578445e41d5ae33f824a00ddba0a8b80bb591d445d54738227818a203b860532d74e767e8477e34505746a80174e777d23e97c4d13257a0
7
+ data.tar.gz: 4b8393824cafb8d731b25318ec918c81b36170b93309b2697c167419fd652f9672e2f130e7016684f12bc891a1ca4fa05222e790400a333ce0fc8e4a814f5020
@@ -20,7 +20,9 @@ module Warden
20
20
 
21
21
  raise Errors::WrongAud, 'wrong audience' unless aud_claim_valid?
22
22
 
23
- user = user_resolver(decoded_token)
23
+ method = "#{scope}_resolver"
24
+ raise "unimplemented resolver #{method}" unless respond_to?(method)
25
+ user = send(method, decoded_token)
24
26
 
25
27
  raise Warden::Auth0::Errors::NilUser, 'nil user' unless user
26
28
 
@@ -50,10 +52,6 @@ module Warden
50
52
  TokenDecoder.new.call(token)
51
53
  end
52
54
 
53
- def user_resolver(decoded_token)
54
- raise "TODO: Implement!"
55
- end
56
-
57
55
  def configured_aud
58
56
  configured_aud = Warden::Auth0.config.aud
59
57
  raise Errors::NoConfiguredAud if configured_aud.nil?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Warden
4
4
  module Auth0
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 1KOMMA5º
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-13 00:00:00.000000000 Z
11
+ date: 2024-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-auto_inject