tokenex 0.2.0 → 0.3.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/README.md +1 -1
- data/lib/tokenex/environment.rb +25 -1
- data/lib/tokenex/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0876095eaf84ab5fab6c2287ea20562be89add3
|
4
|
+
data.tar.gz: db6c639798126650347a840c429ff468144fe96c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf95c4ddde89888a465b7d2032bf8c7fee34673b17237c876ff3b31871840e7164675f026aa2e8bf4eb345af647f57569f9018bd86575256e378befd9b187bca
|
7
|
+
data.tar.gz: 27d866587f69302442753c6e914f588b1150b01b631401cbfb5f8891f9bc472e5cc02217d755a4b42248e9c77cf42ab206fc8d26c0ada14ba65e485578fd3eab
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Tokenex [](https://travis-ci.org/cliffom/tokenex-gem)
|
1
|
+
# Tokenex [](https://travis-ci.org/cliffom/tokenex-gem) [](https://badge.fury.io/rb/tokenex)
|
2
2
|
|
3
3
|
A convenient Ruby wrapper for the TokenEx API.
|
4
4
|
|
data/lib/tokenex/environment.rb
CHANGED
@@ -24,7 +24,7 @@ module Tokenex
|
|
24
24
|
return response['Token']
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def detokenize(token)
|
28
28
|
action = "Detokenize"
|
29
29
|
data = {
|
30
30
|
"Token" => token
|
@@ -36,6 +36,30 @@ module Tokenex
|
|
36
36
|
return response['Value']
|
37
37
|
end
|
38
38
|
|
39
|
+
def validate_token(token)
|
40
|
+
action = "ValidateToken"
|
41
|
+
data = {
|
42
|
+
"Token" => token
|
43
|
+
}
|
44
|
+
|
45
|
+
response = send_request(action, data)
|
46
|
+
throw :tokenex_invalid_token unless is_valid_response(response)
|
47
|
+
|
48
|
+
return response['Valid']
|
49
|
+
end
|
50
|
+
|
51
|
+
def delete_token(token)
|
52
|
+
action = "DeleteToken"
|
53
|
+
data = {
|
54
|
+
"Token" => token
|
55
|
+
}
|
56
|
+
|
57
|
+
response = send_request(action, data)
|
58
|
+
throw :tokenex_invalid_token unless is_valid_response(response)
|
59
|
+
|
60
|
+
return response['Success']
|
61
|
+
end
|
62
|
+
|
39
63
|
private
|
40
64
|
def headers
|
41
65
|
{
|
data/lib/tokenex/version.rb
CHANGED