token_auth 0.3.0.beta2 → 0.3.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 +4 -4
- data/app/controllers/token_auth/api/authentication_tokens_controller.rb +1 -1
- data/app/controllers/token_auth/api/payloads_controller.rb +1 -0
- data/app/controllers/token_auth/authentication_tokens_controller.rb +2 -2
- data/app/controllers/token_auth/configuration_tokens_controller.rb +1 -1
- data/app/controllers/token_auth/tokens_controller.rb +2 -2
- data/app/models/token_auth/payload.rb +4 -2
- data/config/brakeman.ignore +42 -0
- data/lib/token_auth/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6252bfa11b50c55c70e0c8dc59991fa071ee78fb
|
4
|
+
data.tar.gz: d2fea9c3ae437c79b9ee345afa83861e7818a5a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e888b76edec9ff0d18296ba9fb8f1affb9257129645960b2b1910c88db064a6b88e064edd26085769750cd2efad5cad00068d3fbcc72454d911bfb1fccb2d385
|
7
|
+
data.tar.gz: 512c09001531c69cf0d536f4ffd340908538334a4ff6d56ecb2a4cf3109b1cb1081e325345fb8cdc88ae026c23618227dc874164bc0020a54f663622bac7cd50
|
@@ -6,7 +6,7 @@ module TokenAuth
|
|
6
6
|
class AuthenticationTokensController < ::TokenAuth::Api::BaseController
|
7
7
|
RESOURCE_TYPE = "authenticationTokens"
|
8
8
|
|
9
|
-
include Concerns::CorsSettings
|
9
|
+
include TokenAuth::Concerns::CorsSettings
|
10
10
|
|
11
11
|
after_action do |controller|
|
12
12
|
controller.cors_set_access_control_headers(
|
@@ -3,7 +3,7 @@ module TokenAuth
|
|
3
3
|
# Manages Authentication Tokens.
|
4
4
|
class AuthenticationTokensController < ::TokenAuth::BaseController
|
5
5
|
def update
|
6
|
-
token = AuthenticationToken.
|
6
|
+
token = AuthenticationToken.find_by(entity_id: params[:entity_id])
|
7
7
|
|
8
8
|
if token.update(token_params)
|
9
9
|
redirect_to tokens_url(token.entity_id),
|
@@ -18,7 +18,7 @@ module TokenAuth
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def destroy
|
21
|
-
token = AuthenticationToken.
|
21
|
+
token = AuthenticationToken.find_by(entity_id: params[:entity_id])
|
22
22
|
|
23
23
|
if token.destroy
|
24
24
|
redirect_to tokens_url(token.entity_id),
|
@@ -5,9 +5,9 @@ module TokenAuth
|
|
5
5
|
def index
|
6
6
|
@entity_id = params[:entity_id]
|
7
7
|
@authentication_token = AuthenticationToken
|
8
|
-
.
|
8
|
+
.find_by(entity_id: @entity_id)
|
9
9
|
@configuration_token = ConfigurationToken
|
10
|
-
.
|
10
|
+
.find_by(entity_id: @entity_id)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -66,12 +66,14 @@ module TokenAuth
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def deserialize(params)
|
69
|
-
|
70
|
-
|
69
|
+
attrs = {}
|
70
|
+
params.each do |name, value|
|
71
71
|
name = name.to_s.underscore
|
72
72
|
name = "uuid" if name == "id"
|
73
73
|
attrs[name] = value
|
74
74
|
end
|
75
|
+
|
76
|
+
attrs
|
75
77
|
end
|
76
78
|
end
|
77
79
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
{
|
2
|
+
"ignored_warnings": [
|
3
|
+
{
|
4
|
+
"warning_type": "Cross-Site Request Forgery",
|
5
|
+
"warning_code": 7,
|
6
|
+
"fingerprint": "c674d468288bd469bd3118d61dc6a38738f84047fe7a8ee381cdc7786a51c8cd",
|
7
|
+
"message": "'protect_from_forgery' should be called in TokenAuth::Api::PayloadsController",
|
8
|
+
"file": "app/controllers/token_auth/api/payloads_controller.rb",
|
9
|
+
"line": 7,
|
10
|
+
"link": "http://brakemanscanner.org/docs/warning_types/cross-site_request_forgery/",
|
11
|
+
"code": null,
|
12
|
+
"render_path": null,
|
13
|
+
"location": {
|
14
|
+
"type": "controller",
|
15
|
+
"controller": "TokenAuth::Api::PayloadsController"
|
16
|
+
},
|
17
|
+
"user_input": null,
|
18
|
+
"confidence": "High",
|
19
|
+
"note": ""
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"warning_type": "Cross-Site Request Forgery",
|
23
|
+
"warning_code": 7,
|
24
|
+
"fingerprint": "f4b575f7a0660e776b6f6a29f548beb56b6b506e386fe386430ba52e25c3f350",
|
25
|
+
"message": "'protect_from_forgery' should be called in TokenAuth::Api::BaseController",
|
26
|
+
"file": "app/controllers/token_auth/api/base_controller.rb",
|
27
|
+
"line": 4,
|
28
|
+
"link": "http://brakemanscanner.org/docs/warning_types/cross-site_request_forgery/",
|
29
|
+
"code": null,
|
30
|
+
"render_path": null,
|
31
|
+
"location": {
|
32
|
+
"type": "controller",
|
33
|
+
"controller": "TokenAuth::Api::BaseController"
|
34
|
+
},
|
35
|
+
"user_input": null,
|
36
|
+
"confidence": "High",
|
37
|
+
"note": ""
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"updated": "2017-01-09 11:10:39 -0600",
|
41
|
+
"brakeman_version": "3.4.1"
|
42
|
+
}
|
data/lib/token_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: token_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Carty-Fickes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- app/models/token_auth/uuid_enabled.rb
|
192
192
|
- app/serializers/token_auth/synchronizable_resource_serializer.rb
|
193
193
|
- app/views/token_auth/tokens/index.html.erb
|
194
|
+
- config/brakeman.ignore
|
194
195
|
- config/locales/en.yml
|
195
196
|
- config/locales/es-PE.yml
|
196
197
|
- config/locales/pt-BR.yml
|
@@ -217,12 +218,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
218
|
version: '0'
|
218
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
220
|
requirements:
|
220
|
-
- - "
|
221
|
+
- - ">="
|
221
222
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
223
|
+
version: '0'
|
223
224
|
requirements: []
|
224
225
|
rubyforge_project:
|
225
|
-
rubygems_version: 2.6.
|
226
|
+
rubygems_version: 2.6.8
|
226
227
|
signing_key:
|
227
228
|
specification_version: 4
|
228
229
|
summary: Rails engine for authenticating clients anonymously.
|