token_auth 0.3.0.beta2 → 0.3.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
  SHA1:
3
- metadata.gz: 28ecd746060687cf1a14084aaa84536a76eda612
4
- data.tar.gz: fc839f2c7bb17b0fe713b022da9dae5f086e941b
3
+ metadata.gz: 6252bfa11b50c55c70e0c8dc59991fa071ee78fb
4
+ data.tar.gz: d2fea9c3ae437c79b9ee345afa83861e7818a5a8
5
5
  SHA512:
6
- metadata.gz: 2f9463cd34313112a53111822040bd91afc17172d059fd5918bbab3f7e3cfec1ad4527b274319a9c982662ff5f72624925fbdfaa85cf7f3eac7fe1621268df5d
7
- data.tar.gz: 850aaf315769faf2bf98ae379dd27a8b4a1265b1b22786d72ee6905fcfb5a4daa1cbc491ea6b5842c80425d393fe71a46a75a97308a62fb27b6d7aadc64f3b15
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(
@@ -94,6 +94,7 @@ module TokenAuth
94
94
 
95
95
  def pullable_records
96
96
  entity_id = authentication_token.entity_id
97
+
97
98
  SynchronizableResource.pullable_records_for(
98
99
  entity_id: entity_id,
99
100
  filter: params[:filter]
@@ -3,7 +3,7 @@ module TokenAuth
3
3
  # Manages Authentication Tokens.
4
4
  class AuthenticationTokensController < ::TokenAuth::BaseController
5
5
  def update
6
- token = AuthenticationToken.find_by_entity_id(params[:entity_id])
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.find_by_entity_id(params[:entity_id])
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),
@@ -18,7 +18,7 @@ module TokenAuth
18
18
  end
19
19
 
20
20
  def destroy
21
- token = ConfigurationToken.find_by_entity_id(params[:entity_id])
21
+ token = ConfigurationToken.find_by(entity_id: params[:entity_id])
22
22
 
23
23
  if token.nil?
24
24
  redirect_to tokens_index,
@@ -5,9 +5,9 @@ module TokenAuth
5
5
  def index
6
6
  @entity_id = params[:entity_id]
7
7
  @authentication_token = AuthenticationToken
8
- .find_by_entity_id(@entity_id)
8
+ .find_by(entity_id: @entity_id)
9
9
  @configuration_token = ConfigurationToken
10
- .find_by_entity_id(@entity_id)
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
- params.each_with_object({}) do |pair, attrs|
70
- name, value = pair
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
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Engine version.
3
3
  module TokenAuth
4
- VERSION = "0.3.0.beta2"
4
+ VERSION = "0.3.1"
5
5
  end
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.0.beta2
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: 2016-07-27 00:00:00.000000000 Z
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: 1.3.1
223
+ version: '0'
223
224
  requirements: []
224
225
  rubyforge_project:
225
- rubygems_version: 2.6.4
226
+ rubygems_version: 2.6.8
226
227
  signing_key:
227
228
  specification_version: 4
228
229
  summary: Rails engine for authenticating clients anonymously.