graphql-auth 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql-auth/jwt_manager.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a7b7e118da956df77ba9154ca58ed7087d2d0f6
|
4
|
+
data.tar.gz: a3a70ad19577c8bc648cc21ca5035ad87cc280ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30111d8b814841ffca793b203d5690059e1a18a5a8add1cc705810c5e5b3288708c82f04e4413fc3afef0b735ea1045f8d156ced5888c5d077feacfeb844fcac
|
7
|
+
data.tar.gz: e6bcb40a2e314b73bfc53c95f4cc937d794d3203a2bdd4cdfb4f630df346d2adf6a0795f7e6be24077274eb7b782a02715b7566303e669ca7c00522a9b32fcc5
|
@@ -8,8 +8,12 @@ module GraphQL
|
|
8
8
|
TYPE = 'Bearer'
|
9
9
|
|
10
10
|
class << self
|
11
|
-
def issue(payload,
|
12
|
-
|
11
|
+
def issue(payload, custom_expiration = nil)
|
12
|
+
if custom_expiration.present? && custom_expiration.kind_of? ActiveSupport::Duration
|
13
|
+
payload[:exp] = custom_expiration
|
14
|
+
else
|
15
|
+
payload.merge!(expiration)
|
16
|
+
end
|
13
17
|
|
14
18
|
token = JWT.encode payload,
|
15
19
|
auth_secret,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Ferland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|