keyless 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/keyless.gemspec +1 -0
- data/lib/keyless/jwt.rb +0 -2
- data/lib/keyless/rsa_public_key.rb +0 -4
- data/lib/keyless/version.rb +1 -1
- data/lib/keyless.rb +35 -24
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc95fbabb0cbdb850e0f0a7ec811a050df4a6f43d8c761ff2703312f355429a
|
4
|
+
data.tar.gz: 6b890ac7e7ee3e920567039b704d6dd6a23f7b31c8c2c9cf5409ad8cf95d00d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c2b57068e0513809930c46ae26d45d6ab3c8cc6a536444f4bb4ba641c5f8cacf476a7b1209afaa48077fe4ce5a523461122932ab9e7c6fd715d431df72058bd
|
7
|
+
data.tar.gz: 4faffaff2617f964018c6ff6f3dc4e54290b339d9a02cf38ee71836e7d615001ab998159e2a6667c6f3a3f26acda1851a5b6973fa1f956395b9b3a84f4b5c21c
|
data/CHANGELOG.md
CHANGED
data/keyless.gemspec
CHANGED
data/lib/keyless/jwt.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'singleton'
|
4
|
-
require 'openssl'
|
5
|
-
require 'httparty'
|
6
|
-
|
7
3
|
module Keyless
|
8
4
|
# A common purpose RSA public key fetching/caching helper. With the help
|
9
5
|
# of this class you are able to retrieve the RSA public key from a remote
|
data/lib/keyless/version.rb
CHANGED
data/lib/keyless.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'zeitwerk'
|
3
4
|
require 'active_support'
|
4
5
|
require 'active_support/concern'
|
5
6
|
require 'active_support/configurable'
|
@@ -8,38 +9,48 @@ require 'active_support/core_ext/hash'
|
|
8
9
|
require 'active_support/time'
|
9
10
|
require 'active_support/time_with_zone'
|
10
11
|
require 'jwt'
|
11
|
-
require '
|
12
|
-
require '
|
13
|
-
require '
|
14
|
-
require '
|
12
|
+
require 'recursive-open-struct'
|
13
|
+
require 'singleton'
|
14
|
+
require 'openssl'
|
15
|
+
require 'httparty'
|
15
16
|
|
16
17
|
# The JWT authentication concern.
|
17
18
|
module Keyless
|
18
|
-
|
19
|
+
# Setup a Zeitwerk autoloader instance and configure it
|
20
|
+
loader = Zeitwerk::Loader.for_gem
|
21
|
+
|
22
|
+
# Finish the auto loader configuration
|
23
|
+
loader.setup
|
24
|
+
|
25
|
+
# Load standalone code
|
26
|
+
require 'keyless/version'
|
27
|
+
|
28
|
+
# Make sure to eager load all SDK constants
|
29
|
+
loader.eager_load
|
19
30
|
|
20
31
|
class << self
|
21
32
|
attr_writer :configuration
|
22
|
-
end
|
23
33
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
34
|
+
# Retrieve the current configuration object.
|
35
|
+
#
|
36
|
+
# @return [Configuration]
|
37
|
+
def configuration
|
38
|
+
@configuration ||= Configuration.new
|
39
|
+
end
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
41
|
+
# Configure the concern by providing a block which takes
|
42
|
+
# care of this task. Example:
|
43
|
+
#
|
44
|
+
# Keyless.configure do |conf|
|
45
|
+
# # conf.xyz = [..]
|
46
|
+
# end
|
47
|
+
def configure
|
48
|
+
yield(configuration)
|
49
|
+
end
|
40
50
|
|
41
|
-
|
42
|
-
|
43
|
-
|
51
|
+
# Reset the current configuration with the default one.
|
52
|
+
def reset_configuration!
|
53
|
+
self.configuration = Configuration.new
|
54
|
+
end
|
44
55
|
end
|
45
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keyless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-01-
|
13
|
+
date: 2025-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '2.0'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: zeitwerk
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.6'
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - "~>"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '2.6'
|
71
85
|
description: A reusable JWT authentication helper
|
72
86
|
email:
|
73
87
|
- hermann.mayer92@gmail.com
|