krn-auth-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/krn/auth.rb +3 -26
- data/lib/krn/auth/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: 11a2bb64b4a8b8d75cb6c1ba6e93fb55386bd34aad629f46b92a34f13af8f8b6
|
4
|
+
data.tar.gz: f9bbabd9dff4ad72dd11bff5910368d0a2ff2163c8428ca65fb80c731c83ae8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7732d84731a9941e95f7f5ca9e7835b5f3299860bea3fad44a2b4c30934f86e1db92886e9008ba33acdd8c53074634d818b6e3a1390d0263f414c42408894345
|
7
|
+
data.tar.gz: 8594f47bb54299299629cc550aa80ae7e95f04563a8fa55d0e5e0c86e316b2ce9f1edbe9b53d6409f92076d97d9b76daf220db707d48ccc0e9a38b7cab7ce720
|
data/lib/krn/auth.rb
CHANGED
@@ -32,36 +32,13 @@ module Krn
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def deep_validate(passport: '')
|
35
|
-
|
36
|
-
renew(passport: $passport) {
|
37
|
-
Message
|
38
|
-
Renewed
|
39
|
-
PassPort
|
40
|
-
Expires
|
41
|
-
Error
|
42
|
-
DecodedToken {
|
43
|
-
Email,
|
44
|
-
ID,
|
45
|
-
IntID,
|
46
|
-
NickName
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}"
|
50
|
-
query = {
|
51
|
-
operationName: 'doRenew',
|
52
|
-
query: gqlquery,
|
53
|
-
variables: {
|
54
|
-
passport: passport
|
55
|
-
}
|
56
|
-
}
|
57
|
-
uri = URI("#{trinity_url}/graphql")
|
35
|
+
uri = URI("#{trinity_url}/deep-validate?token=#{passport}")
|
58
36
|
http = Net::HTTP.new(uri.host, uri.port)
|
59
37
|
http.use_ssl = true
|
60
38
|
req = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
|
61
|
-
req.body = query.to_json
|
62
39
|
res = http.request(req)
|
63
|
-
JSON.parse(res.body)
|
64
|
-
rescue StandardError
|
40
|
+
JSON.parse(res.body)
|
41
|
+
rescue StandardError
|
65
42
|
false
|
66
43
|
end
|
67
44
|
|
data/lib/krn/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krn-auth-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Helmut Januschka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|