plyom_user 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plyom_user.rb +2 -2
- data/lib/plyom_user/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: e4c7b0d39c8a4752e63951a9b0a8cdc3b1002426
|
4
|
+
data.tar.gz: b40d53e33ae6cd4f5ee7d3f4270f2acdbcda9005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d9fb5977a1543381ee7d004ae587941be7cacb7b87126664a7b5e6262966a49ad3b3fe14999123eaa08be812a0e27ed0f817c8b66bcf15c3f894aa0556c6d56
|
7
|
+
data.tar.gz: 3c44873f5776c0205e9ef8af5941cdd30ad723dc0b3b46b28580c1d064f2ef255f872396c55dc920a0a95a8044f3620cb8fc00281770bf144fa092ae37be5f8f
|
data/lib/plyom_user.rb
CHANGED
@@ -82,7 +82,7 @@ module Plyom
|
|
82
82
|
def authenticated?(token)
|
83
83
|
auth_token = { "Authorization" => "Token token=\"#{token}\"" }
|
84
84
|
paramters = {username_email: @params[:username], password: @params[:password]}
|
85
|
-
response = HTTParty.get("#{uri}authentication", headers: auth_token, query: paramters)
|
85
|
+
response = HTTParty.get("#{self.uri}authentication", headers: auth_token, query: paramters)
|
86
86
|
result = JSON.parse(response.body)
|
87
87
|
if result["success"]
|
88
88
|
@token = result["token"]
|
@@ -100,7 +100,7 @@ module Plyom
|
|
100
100
|
def check_token(token)
|
101
101
|
paramters = {token: @token}
|
102
102
|
auth_token = { "Authorization" => "Token token=\"#{token}\"" }
|
103
|
-
response = HTTParty.get("#{uri}token_validation", headers: auth_token, query: paramters)
|
103
|
+
response = HTTParty.get("#{self.uri}token_validation", headers: auth_token, query: paramters)
|
104
104
|
response.body
|
105
105
|
end
|
106
106
|
|
data/lib/plyom_user/version.rb
CHANGED