grape-jwt-authentication 2.0.1 → 2.0.2
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/README.md +1 -1
- data/lib/grape/jwt/authentication.rb +1 -1
- data/lib/grape/jwt/authentication/configuration.rb +7 -7
- data/lib/grape/jwt/authentication/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e9342b70db03baa2d358176c7a95c64ce06d60905245dc68939059ce5fc853a
|
4
|
+
data.tar.gz: '025155931791462ef7afc5366410ed3426bb8a5f15d3d4a641c7e70d232da84b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86cbd40f1df368f4836638dff6ee80c12c8a70aa0b7f3a39a763a7aa28b4bdf3a878634f5a8bb05bb91094e3d838e1f61b216dac84a84f17afa403bb69950820
|
7
|
+
data.tar.gz: 1c12302d38a2fb246db94353a4c55db7fa40f3717f0ba90ab7fe1e5391e926f7c8ac7cef2f710a79338260726c16bcad0b65c048719c0a9c05d51ded9f835475
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -305,7 +305,7 @@ end
|
|
305
305
|
You can configure a different JSON Web Token verification option hash if your
|
306
306
|
algorithm differs or you want some extra/different options. Just watch out
|
307
307
|
that you have to pass a proc to this configuration property. On the
|
308
|
-
`
|
308
|
+
`Keyless::Jwt` class it has to be a simple hash. The default
|
309
309
|
is here the `RS256` algorithm with enabled expiration check, and issuer+audience
|
310
310
|
check when the `jwt_issuer` / `jwt_beholder` are configured accordingly.
|
311
311
|
|
@@ -65,7 +65,7 @@ module Grape
|
|
65
65
|
# date, etc inside your API definition. When the authenticator stated
|
66
66
|
# that the validation failed, then the parsed token is +nil+.
|
67
67
|
#
|
68
|
-
# @return [
|
68
|
+
# @return [Keyless::Jwt, nil] the parsed token
|
69
69
|
def request_jwt
|
70
70
|
env['grape_jwt_auth.parsed_token']
|
71
71
|
end
|
@@ -96,10 +96,10 @@ module Grape
|
|
96
96
|
# You can configure a different JSON Web Token verification option hash
|
97
97
|
# if your algorithm differs or you want some extra/different options.
|
98
98
|
# Just watch out that you have to pass a proc to this configuration
|
99
|
-
# property. On the {
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
99
|
+
# property. On the {Keyless::Jwt} class it has to be a simple hash. The
|
100
|
+
# default is here the RS256 algorithm with enabled expiration check,
|
101
|
+
# and issuer+audience check when the {jwt_issuer}/{jwt_beholder} are
|
102
|
+
# configured accordingly.
|
103
103
|
config_accessor(:jwt_options) do
|
104
104
|
proc do
|
105
105
|
conf = Grape::Jwt::Authentication.configuration
|
@@ -117,9 +117,9 @@ module Grape
|
|
117
117
|
# You can configure your own verification key on the Jwt wrapper class.
|
118
118
|
# This way you can pass your HMAC secret or your ECDSA public key to
|
119
119
|
# the JSON Web Token validation method. Here you need to pass a proc,
|
120
|
-
# on the {
|
121
|
-
#
|
122
|
-
#
|
120
|
+
# on the {Keyless::Jwt} class it has to be a scalar value. By default
|
121
|
+
# we use the {Keyless::RsaPublicKey} class to retrieve the RSA public
|
122
|
+
# key.
|
123
123
|
config_accessor(:jwt_verification_key) do
|
124
124
|
proc { Keyless::RsaPublicKey.instance.fetch }
|
125
125
|
end
|