authentic-jwt 1.1.0 → 1.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 +4 -4
- data/definitions/payload.proto +3 -0
- data/lib/authentic_jwt/errors.rb +1 -0
- data/lib/authentic_jwt/payload_pb.rb +3 -0
- data/lib/authentic_jwt/validator.rb +2 -0
- data/lib/authentic_jwt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfecd946ac89c26278f3a3bc550fe3a68c2809bb
|
4
|
+
data.tar.gz: 69be0ae06001500873f1aba115d93213ec6036f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc4efd773040174eb293e805b1f7d7fe5775ada887979f38b708aa487e90d432dc70593d39ef409760f75c9394d9554e0e94d2f28819ea1638daaf1268abf064
|
7
|
+
data.tar.gz: 2ea2f1befaa21c638a545ce464f9bf2887cfb375e3c5b05a235ec9f3edfafbbb3955bda0ed715e87c11ab06d6abdcc68bbe2958bbfb8984444835e047019d7d3
|
data/definitions/payload.proto
CHANGED
@@ -38,6 +38,8 @@ message Payload {
|
|
38
38
|
// string jti = 7;
|
39
39
|
reserved 4 to 9;
|
40
40
|
repeated Role roles = 10;
|
41
|
+
string name = 11;
|
42
|
+
bool auto_approve = 12;
|
41
43
|
}
|
42
44
|
|
43
45
|
message External {
|
@@ -71,4 +73,5 @@ message Payload {
|
|
71
73
|
repeated Partner partners = 13;
|
72
74
|
repeated Account accounts = 14;
|
73
75
|
repeated External external = 15;
|
76
|
+
int32 jwt_token_version = 16;
|
74
77
|
}
|
data/lib/authentic_jwt/errors.rb
CHANGED
@@ -13,6 +13,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
13
13
|
repeated :partners, :message, 13, "AuthenticJwt.Payload.Partner"
|
14
14
|
repeated :accounts, :message, 14, "AuthenticJwt.Payload.Account"
|
15
15
|
repeated :external, :message, 15, "AuthenticJwt.Payload.External"
|
16
|
+
optional :jwt_token_version, :int32, 16
|
16
17
|
end
|
17
18
|
add_message "AuthenticJwt.Payload.Partner" do
|
18
19
|
optional :aud, :string, 3
|
@@ -21,6 +22,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
21
22
|
add_message "AuthenticJwt.Payload.Account" do
|
22
23
|
optional :aud, :string, 3
|
23
24
|
repeated :roles, :enum, 10, "AuthenticJwt.Payload.Role"
|
25
|
+
optional :name, :string, 11
|
26
|
+
optional :auto_approve, :bool, 12
|
24
27
|
end
|
25
28
|
add_message "AuthenticJwt.Payload.External" do
|
26
29
|
optional :iss, :string, 1
|
@@ -48,6 +48,8 @@ module AuthenticJwt
|
|
48
48
|
rescue JWT::DecodeError => error
|
49
49
|
if error.message =~ /Signature verification raised/
|
50
50
|
raise Unauthorized, "JWT does not match signature"
|
51
|
+
elsif error.message =~ /Signature has expired/
|
52
|
+
raise Expired, "JWT has expired"
|
51
53
|
else
|
52
54
|
raise Unauthorized, "Bearer token is not a valid JWT"
|
53
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentic-jwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Authentic Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.6.11
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Client authentication for Authentic Apps
|