auth0-verifier 0.1.0 → 0.2.0

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: bb8f942000982639197c60d8e94a4197ac96b2f1e1dfdaa072db9ca3fc734dc9
4
- data.tar.gz: c7d229c9e6b646527de507d03fa8bc3a22a0177af5c1aa0a2bde109fee7b3696
3
+ metadata.gz: 8c457bbc71c7db5ab7200f545a54d94617284807c0e633d96d5fce5088712cdf
4
+ data.tar.gz: 588cb1dc4794bc191d9f4119141cbfdb9fd60a87c65ff6865dd211c175e0e8e2
5
5
  SHA512:
6
- metadata.gz: 3c1f7a2dadc29d891c1cf2ab6e26deb7a4aa9e02ce3fcfbffd566d11c175e3f2927360e9d22f38b80d19d55ab03edcdcec402d57802f2ca1bbb50b1cbeb328e5
7
- data.tar.gz: 807f500cf6ec6a295c716284df847371445977ee922d570b74924f7d30c819f1ca85c798b7155a87cf0dbab2ad74487a9e428dc576fbd46a952a97afaad8b50b
6
+ metadata.gz: 3b23b4029d7d28cae8e7abd7ef98b313f5e17f4d11aa35db3050c2238cf795c9ae46ad7baf2990c4805cf1560919b46a4f93f69da83a17b0fc7cf731db59e831
7
+ data.tar.gz: 1299c05abd0ae6242ca4541702fe95bea454e0f9a2e9e5224a88ee4fd644d1c92a4bdd555200a174eedca825005f31a6b25890d174df0771255417fcdf82fae2
@@ -25,3 +25,6 @@ Metrics/BlockLength:
25
25
 
26
26
  Style/Documentation:
27
27
  Enabled: false
28
+
29
+ Style/EmptyMethod:
30
+ Enabled: false
@@ -1,7 +1,24 @@
1
1
  ---
2
2
  sudo: false
3
+ bundler_args: --without development
4
+
3
5
  language: ruby
6
+
4
7
  cache: bundler
8
+
5
9
  rvm:
10
+ - 2.3.0
11
+ - 2.4.0
12
+ - 2.5.0
6
13
  - 2.6.0
7
- before_install: gem install bundler -v 2.0.1
14
+ - ruby-head
15
+
16
+ before_install:
17
+ - gem install bundler -v 2.0.1
18
+
19
+ script:
20
+ - bundle exec rspec
21
+
22
+ matrix:
23
+ allow_failures:
24
+ - rvm: ruby-head
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auth0-verifier (0.1.0)
4
+ auth0-verifier (0.2.0)
5
5
  jwt (>= 2.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.5.2)
10
+ addressable (2.6.0)
11
11
  public_suffix (>= 2.0.2, < 4.0)
12
12
  ast (2.4.0)
13
13
  coderay (1.1.2)
@@ -17,16 +17,17 @@ GEM
17
17
  docile (1.3.1)
18
18
  hashdiff (0.3.8)
19
19
  jaro_winkler (1.5.2)
20
- json (2.1.0)
20
+ json (2.2.0)
21
21
  jwt (2.1.0)
22
22
  method_source (0.9.2)
23
- parallel (1.12.1)
24
- parser (2.5.3.0)
23
+ parallel (1.14.0)
24
+ parser (2.6.0.0)
25
25
  ast (~> 2.4.0)
26
26
  powerpack (0.1.2)
27
27
  pry (0.12.2)
28
28
  coderay (~> 1.1.0)
29
29
  method_source (~> 0.9.0)
30
+ psych (3.1.0)
30
31
  public_suffix (3.0.3)
31
32
  rainbow (3.0.0)
32
33
  rake (12.3.2)
@@ -43,18 +44,19 @@ GEM
43
44
  diff-lcs (>= 1.2.0, < 2.0)
44
45
  rspec-support (~> 3.8.0)
45
46
  rspec-support (3.8.0)
46
- rubocop (0.62.0)
47
+ rubocop (0.65.0)
47
48
  jaro_winkler (~> 1.5.1)
48
49
  parallel (~> 1.10)
49
50
  parser (>= 2.5, != 2.5.1.1)
50
51
  powerpack (~> 0.1)
52
+ psych (>= 3.1.0)
51
53
  rainbow (>= 2.2.2, < 4.0)
52
54
  ruby-progressbar (~> 1.7)
53
55
  unicode-display_width (~> 1.4.0)
54
- rubocop-rspec (1.31.0)
56
+ rubocop-rspec (1.32.0)
55
57
  rubocop (>= 0.60.0)
56
58
  ruby-progressbar (1.10.0)
57
- safe_yaml (1.0.4)
59
+ safe_yaml (1.0.5)
58
60
  simplecov (0.16.1)
59
61
  docile (~> 1.1)
60
62
  json (>= 1.8, < 3)
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Auth0 Verifier
2
2
 
3
- Verify [Auth0](auth0) JWT token using RS256 with JWKS method.
3
+ Verify [Auth0][auth0] JWT token using RS256 with JWKS method.
4
4
 
5
5
  [![Gem Version](https://img.shields.io/gem/v/auth0-verifier.svg?style=flat-square)][rubygems]
6
+ [![Build Status](https://img.shields.io/travis/com/jpalumickas/auth0-verifier.svg?style=flat-square)][travis]
6
7
 
7
8
  ## Installation
8
9
 
@@ -62,7 +63,7 @@ Everyone interacting in the Auth0 Verifier project’s codebases, issue trackers
62
63
  Copyright (c) 2019 Justas Palumickas. See [LICENSE][license] for details.
63
64
 
64
65
  [rubygems]: https://rubygems.org/gems/auth0-verifier
65
- [travis]: https://travis-ci.org/jpalumickas/auth0-verifier
66
+ [travis]: https://travis-ci.com/jpalumickas/auth0-verifier
66
67
 
67
68
  [license]: https://raw.githubusercontent.com/jpalumickas/auth0-verifie/master/LICENSE
68
69
  [auth0]: https://auth0.com
@@ -14,7 +14,7 @@ module Auth0
14
14
  end
15
15
 
16
16
  def domain
17
- @domain || URI(ENV['AUTH0_DOMAIN']).host
17
+ (@domain || ENV['AUTH0_DOMAIN']).gsub(%r{\Ahttps?://}, '')
18
18
  end
19
19
 
20
20
  def type
@@ -17,7 +17,7 @@ module Auth0
17
17
  end
18
18
 
19
19
  def config
20
- @config ||= Configuration.new
20
+ @config ||= Auth0::Verifier::Configuration.new
21
21
  end
22
22
  alias configuration config
23
23
 
@@ -10,14 +10,14 @@ module Auth0
10
10
  decode_jwt do |header|
11
11
  jwks.keys[header['kid']]
12
12
  end
13
- rescue JWT::DecodeError, JWT::VerificationError
13
+ rescue ::JWT::DecodeError, ::JWT::VerificationError
14
14
  raise Auth0::Verifier::Error, 'Cannot verify token'
15
15
  end
16
16
 
17
17
  private
18
18
 
19
19
  def decode_jwt(&block)
20
- JWT.decode(
20
+ ::JWT.decode(
21
21
  token,
22
22
  nil,
23
23
  true, # Verify the signature of this token
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Auth0
4
4
  module Verifier
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth0-verifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justas Palumickas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt