model_token_auth 1.1.0 → 1.1.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5929157c163b1f04cc0901bed7d7e8dd52ac7757745a95b993df2b6ec6e8f54d
|
|
4
|
+
data.tar.gz: 263e54f27208a612e590b7b685b2493500ad78863d470aa557240cc7c4e04643
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a4401fe57daa58f076e7ec858a727e7e60d67ff20edd6a34c5a21c9733ad681fc55033d3de51291905b60315a91a90d7c5c635d0d674a10043bf221e337a4c5
|
|
7
|
+
data.tar.gz: 42cacc4e2be630e5924a4c5142ab50fda96b8ee3f08075dad8b6772fe169594814363ddc6d92e3d95863d591b6682410ca2565356faaf4be9fbccc694e55b454
|
data/lib/model_token_auth.rb
CHANGED
|
@@ -3,20 +3,21 @@ require 'model_token_auth/access_tokens_config'
|
|
|
3
3
|
require 'model_token_auth/acts_as_model_authenticable'
|
|
4
4
|
require 'model_token_auth/acts_as_controllers_authenticable'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# => Class associated with the models
|
|
7
|
+
# that will be authenticated.
|
|
8
|
+
#
|
|
9
|
+
# if you want to add functionality or
|
|
10
|
+
# parameters you need to open the class
|
|
11
|
+
# in the models folder of the rails application
|
|
12
|
+
#
|
|
8
13
|
class AccessToken < ActiveRecord::Base
|
|
9
14
|
include ModelTokenAuth::AccessTokensConfig
|
|
10
15
|
end
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
ActionController::Base.include(
|
|
17
|
-
ModelTokenAuth::ActsAsControllersAuthenticable
|
|
18
|
-
) if ActionController::Base
|
|
17
|
+
# => *
|
|
18
|
+
ActiveRecord::Base.include ModelTokenAuth::ActsAsModelAuthenticable
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
# => *
|
|
21
|
+
[ActionController::Base, ActionController::API].each do |resource|
|
|
22
|
+
resource.include ModelTokenAuth::ActsAsControllersAuthenticable
|
|
23
|
+
end
|