tramway-api 1.6.1 → 1.6.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bca58876f3668111e2468cbc1f4c891addfc537f922d962df2e0d7fed1ce3c0c
|
4
|
+
data.tar.gz: 1ab78086fb53b2caaa91afd84f03f253044b2bb2795aabbad1bbb2e4a39cfe95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d2ac014846f179a7dcfb5878f78f344df7ea4c693aa9d16eb4f344462ff3ac0723901dd3c88bb7378ca09e09380891270ecf0a21f689e3372a74da6c9f8ca8a
|
7
|
+
data.tar.gz: acd4515b5542e5abf1e3f61916dfd6c26fb9e34f48a34b2098c1c498955a65ab3b2053cfa17b1ac7c89be5349d6eef8b879344b66ec6345b4c118d7186cda082
|
@@ -17,12 +17,13 @@ module Tramway
|
|
17
17
|
head :unauthorized
|
18
18
|
end
|
19
19
|
|
20
|
-
protected
|
21
|
-
|
22
20
|
def authenticate
|
23
|
-
return
|
21
|
+
return if current_user || params[:user_based_model].in?(Tramway::Api.user_based_models)
|
22
|
+
unauthorized
|
24
23
|
end
|
25
24
|
|
25
|
+
protected
|
26
|
+
|
26
27
|
def auth_token
|
27
28
|
if entity.respond_to? :to_token_payload
|
28
29
|
::Knock::AuthToken.new payload: entity.to_token_payload
|
data/lib/tramway/api/version.rb
CHANGED