devise-jwt 0.4.3 → 0.4.4

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: 72630685db4c137840dac73ab7e796710be64898
4
- data.tar.gz: 84719131b0ce80f08f902a4e0686b4168127385b
3
+ metadata.gz: 9129d2a81114b968dc51a11fa2e04aef75b9324f
4
+ data.tar.gz: 26c8980b2a75ba0f225193cc5cffed9b8bbb9c1f
5
5
  SHA512:
6
- metadata.gz: c0092074424ee011f398267517e366f0b389ac3e398d9b1a2bf8538d80c592b027e4ec6e5111e8f45e8e2c65bed0db210a4d2dfe22db20bce4e0e6879de02e2b
7
- data.tar.gz: b46b85585e2eddcbd4e3a73a859b8ebc92737fe4abc71183ad31fba4379e82f4b9689dc779d1d8179e98cb0c99bef39b7ef7979458c947d4b8c857030543e38c
6
+ metadata.gz: 9e89f30b0eee4ffce4632572a71b6c66a1075ba8e0a20e24bc64c0eb2227c27f4ca5df2af7a25296cccf19edb320cfa18236d4d365bf2f50a37983d6746d71de
7
+ data.tar.gz: e4838a029bc9e0753ffb6cd49bf9cdeb50ea88f0c7a909b43e6e60a8e7ecb87639058199350d04d0fbb876db923cdf0e13d0f27bc4c431ffb081a7e02bbd3c68
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [0.4.4] - 2017-12-04
8
+ ### Fixed
9
+ - Configure classes as strings to avoid problems with Rails STI
10
+
7
11
  ## [0.4.3] - 2017-11-23
8
12
  ### Fixed
9
13
  - Return `nil` and not raise when user is not found in model
data/README.md CHANGED
@@ -26,7 +26,7 @@ You can read about which security concerns this library takes into account and a
26
26
  Add this line to your application's Gemfile:
27
27
 
28
28
  ```ruby
29
- gem 'devise-jwt', '~> 0.4.3'
29
+ gem 'devise-jwt', '~> 0.4.4'
30
30
  ```
31
31
 
32
32
  And then execute:
@@ -86,7 +86,20 @@ def jwt_payload
86
86
  end
87
87
  ```
88
88
 
89
- Note: if you are making cross-domain requests, make sure that you add `Authorization` header to the list of allowed request headers and exposed response headers. You can use something like [rack-cors](https://github.com/cyu/rack-cors) for that.
89
+ Note: if you are making cross-domain requests, make sure that you add `Authorization` header to the list of allowed request headers and exposed response headers. You can use something like [rack-cors](https://github.com/cyu/rack-cors) for that, for example:
90
+
91
+ ```ruby
92
+ config.middleware.insert_before 0, Rack::Cors do
93
+ allow do
94
+ origins 'http://your.frontend.domain.com'
95
+ resource '/api/*',
96
+ headers: %w(Authorization),
97
+ methods: :any,
98
+ expose: %w(Authorization),
99
+ max_age: 600
100
+ end
101
+ end
102
+ ```
90
103
 
91
104
  ### Revocation strategies
92
105
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ["lib"]
23
23
 
24
24
  spec.add_dependency 'devise', '~> 4.0'
25
- spec.add_dependency 'warden-jwt_auth', '~> 0.2.0'
25
+ spec.add_dependency 'warden-jwt_auth', '~> 0.2.1'
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 1.12"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
@@ -45,14 +45,14 @@ module Devise
45
45
  def add_mapping(inspector)
46
46
  scope = inspector.scope
47
47
  model = inspector.model
48
- defaults[:mappings][scope] = model
48
+ defaults[:mappings][scope] = model.name
49
49
  end
50
50
 
51
51
  # :reek:FeatureEnvy
52
52
  def add_revocation_strategy(inspector)
53
53
  scope = inspector.scope
54
- model = inspector.model
55
- defaults[:revocation_strategies][scope] = model.jwt_revocation_strategy
54
+ strategy = inspector.model.jwt_revocation_strategy
55
+ defaults[:revocation_strategies][scope] = strategy.name
56
56
  end
57
57
 
58
58
  def add_dispatch_requests(inspector)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Devise
4
4
  module JWT
5
- VERSION = '0.4.3'
5
+ VERSION = '0.4.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Busqué
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-23 00:00:00.000000000 Z
11
+ date: 2017-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.0
33
+ version: 0.2.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.0
40
+ version: 0.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement