jay_doubleu_tee 0.2.0 → 0.2.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/jay_doubleu_tee/decoder.rb +1 -0
- data/lib/jay_doubleu_tee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b97cdc198e67deb3e7bf32f6ea85eefb1b0a8a03f566c38205cd64ab017e412
|
|
4
|
+
data.tar.gz: 2d5177eec6bbd60fcdea34209c47a916efdf425668576436016f1754cc23ef22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fe6669fbe10bb8a0d8bf6ee8f398cb34eac32811b0e9111102687491bbd5d3252ffc8fbde1c6bc48a6217c769e1bfdb9bc092c360d8d3403e6b4d927ce50c20
|
|
7
|
+
data.tar.gz: ca25e6aa0658a1266a2c6ba1b50580e2fda619be0ae34750417fbb2f5ea2b214eb11a748a000965b97554fcd6a5d4365b03025aead23f7af7908f68ee794c73f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
|
-
`
|
|
27
|
+
`jay_doubleu_tee` uses RS256 algorithm by default, so youl'll need a private/public key pair and the access token for testing it out.
|
|
28
28
|
|
|
29
29
|
In your console run
|
|
30
30
|
|
|
@@ -12,6 +12,7 @@ module JayDoubleuTee
|
|
|
12
12
|
InvalidTokenError = Class.new(StandardError)
|
|
13
13
|
|
|
14
14
|
def call(given)
|
|
15
|
+
return Failure(InvalidTokenError.new("Unauthorized. Token missing")) if given.nil? || given.empty?
|
|
15
16
|
# Set password to nil and validation to false otherwise this won't work
|
|
16
17
|
token = extract_token(given)
|
|
17
18
|
res = JWT.decode token, signature, verify?, { algorithm: algorithm }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jay_doubleu_tee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sebastian Wilgosz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-12-
|
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|