solidus_api_devise_token_auth 2.8.0.alpha.0 → 2.8.0.alpha.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: ba2dfc62cb438d1ed3860ba4f788940b0a1078db33b7dba160c097772402c745
4
- data.tar.gz: 14676b6250432a78a647255a5e854423b710c4fee510d5d952a63fb2ee6fa960
3
+ metadata.gz: 437a4dc68518af2c2995f099e9581f5aa609764d5e6910af7fcd0c965ef1b73e
4
+ data.tar.gz: 4d25600f860f2f2da860f4efcf47f14d2664c66ec35168b7bdd0e6c25498b300
5
5
  SHA512:
6
- metadata.gz: 54b00fa5b1cce62c157051aba1e93be20020d6df3beda0dd7ce63460d29c5f0568cdc056fa79e5550d0b0cd122fff90223a9af1fdac07e412518a4cff5e565ad
7
- data.tar.gz: 179aff32c0678429ff9ae77e37a83a99577afec5ad4e3b2c04ac51934a8b8421d7c9a66fc25c6ea5dc7488e78a83bde593c700a85e1f3b64c33d24e21d0c8674
6
+ metadata.gz: aa4419ef76a2790ec4c5e1aac7d4fed25b9672d4bd56fba0b73ed70a4c75d0dcbcaef92a31041fac24054417d5612672aa20ec3b9e2cb2546541fe73082a95e4
7
+ data.tar.gz: b7092993fdae4938d8bd125e0f106ac2052208d3ab5a3c4cce73391bd9dea0b22d68654d4734892deff86c07eda05b5eb653938288080fb81d0ccea0ebc742b6
@@ -7,7 +7,8 @@ module Spree
7
7
  class BaseController < ActionController::Base
8
8
  self.responder = Spree::Api::Responders::AppResponder
9
9
  respond_to :json
10
- protect_from_forgery unless: -> { request.format.json? }
10
+
11
+ skip_forgery_protection
11
12
 
12
13
  include CanCan::ControllerAdditions
13
14
  include Spree::Core::ControllerHelpers::Store
@@ -109,11 +110,6 @@ module Spree
109
110
  render "spree/api/errors/invalid_resource", status: 422
110
111
  end
111
112
 
112
- def api_key
113
- request.headers["X-Spree-Token"] || params[:token]
114
- end
115
- helper_method :api_key
116
-
117
113
  def order_token
118
114
  request.headers["X-Spree-Order-Token"] || params[:order_token]
119
115
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Rails.application.configure do
4
- config.middleware.delete ActionDispatch::Cookies
5
- config.middleware.delete ActionDispatch::Session::CookieStore
6
- config.middleware.delete ActionDispatch::Flash
4
+ # this fixes the cookieoverflow errors without disabling cookies
5
+ # which the user might want to use in non-api controllers
6
+ config.action_dispatch.cookies_serializer = :json
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_api_devise_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0.alpha.0
4
+ version: 2.8.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Siwek (skycocker)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-22 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.8.0.alpha.0
61
+ version: 2.8.0.alpha.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.8.0.alpha.0
68
+ version: 2.8.0.alpha.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: devise_token_auth
71
71
  requirement: !ruby/object:Gem::Requirement