simple_token_authentication 1.13.0 → 1.14.0
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 +13 -5
- data/Appraisals +11 -1
- data/CHANGELOG.md +13 -0
- data/gemfiles/rails_4_devise_3.gemfile +3 -0
- data/gemfiles/rails_4_devise_3.gemfile.lock +163 -0
- data/gemfiles/rails_4_devise_4.gemfile.lock +159 -0
- data/gemfiles/rails_5_devise_4.gemfile +7 -0
- data/gemfiles/rails_5_devise_4.gemfile.lock +156 -0
- data/gemfiles/ruby_1.9.3_rails_3.2.gemfile +2 -0
- data/gemfiles/ruby_1.9.3_rails_3.2.gemfile.lock +150 -0
- data/lib/simple_token_authentication.rb +9 -1
- data/lib/simple_token_authentication/sign_in_handler.rb +1 -1
- data/lib/simple_token_authentication/token_authentication_handler.rb +7 -1
- data/lib/simple_token_authentication/version.rb +1 -1
- data/spec/configuration/action_controller_callbacks_options_spec.rb +87 -4
- data/spec/configuration/fallback_to_devise_option_spec.rb +128 -4
- data/spec/configuration/header_names_option_spec.rb +4 -2
- data/spec/configuration/sign_in_token_option_spec.rb +8 -3
- data/spec/configuration/skip_devise_trackable_option_spec.rb +11 -7
- data/spec/lib/simple_token_authentication/sign_in_handler_spec.rb +10 -3
- data/spec/lib/simple_token_authentication/token_authentication_handler_spec.rb +173 -1
- metadata +51 -42
@@ -10,7 +10,7 @@ describe 'Simple Token Authentication' do
|
|
10
10
|
|
11
11
|
describe ':header_names option', header_names_option: true do
|
12
12
|
|
13
|
-
describe 'determines which header fields are looked at for authentication credentials' do
|
13
|
+
describe 'determines which header fields are looked at for authentication credentials', before_filter: true, before_action: true do
|
14
14
|
|
15
15
|
before(:each) do
|
16
16
|
user = double()
|
@@ -38,6 +38,7 @@ describe 'Simple Token Authentication' do
|
|
38
38
|
# given a controller class which acts as token authentication handler
|
39
39
|
@controller_class = Class.new
|
40
40
|
allow(@controller_class).to receive(:before_filter)
|
41
|
+
allow(@controller_class).to receive(:before_action)
|
41
42
|
@controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
42
43
|
|
43
44
|
@controller = @controller_class.new
|
@@ -394,7 +395,7 @@ describe 'Simple Token Authentication' do
|
|
394
395
|
end
|
395
396
|
end
|
396
397
|
|
397
|
-
it 'can be modified from an initializer file', public: true do
|
398
|
+
it 'can be modified from an initializer file', public: true, before_filter: true, before_action: true do
|
398
399
|
user = double()
|
399
400
|
stub_const('User', user)
|
400
401
|
allow(user).to receive(:name).and_return('User')
|
@@ -412,6 +413,7 @@ describe 'Simple Token Authentication' do
|
|
412
413
|
# given a controller class which acts as token authentication handler
|
413
414
|
@controller_class = Class.new
|
414
415
|
allow(@controller_class).to receive(:before_filter)
|
416
|
+
allow(@controller_class).to receive(:before_action)
|
415
417
|
@controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
416
418
|
|
417
419
|
# INITIALIZATION
|
@@ -16,6 +16,7 @@ describe 'Simple Token Authentication' do
|
|
16
16
|
# given a controller class which acts as token authentication handler
|
17
17
|
controller_class = Class.new
|
18
18
|
allow(controller_class).to receive(:before_filter)
|
19
|
+
allow(controller_class).to receive(:before_action)
|
19
20
|
controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
20
21
|
# and handles authentication for a given model
|
21
22
|
controller_class.acts_as_token_authentication_handler_for User
|
@@ -27,7 +28,9 @@ describe 'Simple Token Authentication' do
|
|
27
28
|
# and both identifier and authentication token are correct
|
28
29
|
allow(@controller).to receive(:find_record_from_identifier).and_return(@record)
|
29
30
|
allow(@controller).to receive(:token_correct?).and_return(true)
|
30
|
-
|
31
|
+
request = double()
|
32
|
+
allow(request).to receive(:env).and_return({})
|
33
|
+
allow(@controller).to receive(:request).and_return(request)
|
31
34
|
end
|
32
35
|
|
33
36
|
context 'when false' do
|
@@ -61,6 +64,7 @@ describe 'Simple Token Authentication' do
|
|
61
64
|
# given a controller class which acts as token authentication handler
|
62
65
|
controller_class = Class.new
|
63
66
|
allow(controller_class).to receive(:before_filter)
|
67
|
+
allow(controller_class).to receive(:before_action)
|
64
68
|
controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
65
69
|
|
66
70
|
allow(SimpleTokenAuthentication).to receive(:sign_in_token).and_return('initial value')
|
@@ -78,8 +82,9 @@ describe 'Simple Token Authentication' do
|
|
78
82
|
# and both identifier and authentication token are correct
|
79
83
|
allow(@controller).to receive(:find_record_from_identifier).and_return(@record)
|
80
84
|
allow(@controller).to receive(:token_correct?).and_return(true)
|
81
|
-
|
82
|
-
|
85
|
+
request = double()
|
86
|
+
allow(request).to receive(:env).and_return({})
|
87
|
+
allow(@controller).to receive(:request).and_return(request)
|
83
88
|
# even if modified *after* the class was loaded
|
84
89
|
allow(SimpleTokenAuthentication).to receive(:sign_in_token).and_return('updated value')
|
85
90
|
|
@@ -4,7 +4,7 @@ describe SimpleTokenAuthentication do
|
|
4
4
|
|
5
5
|
describe ':skip_devise_trackable option', skip_devise_trackable_option: true do
|
6
6
|
|
7
|
-
describe 'determines if token authentication should increment the tracking statistics' do
|
7
|
+
describe 'determines if token authentication should increment the tracking statistics', before_filter: true, before_action: true do
|
8
8
|
|
9
9
|
before(:each) do
|
10
10
|
user = double()
|
@@ -16,6 +16,7 @@ describe SimpleTokenAuthentication do
|
|
16
16
|
# given a controller class which acts as token authentication handler
|
17
17
|
controller_class = Class.new
|
18
18
|
allow(controller_class).to receive(:before_filter)
|
19
|
+
allow(controller_class).to receive(:before_action)
|
19
20
|
controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
20
21
|
controller_class.acts_as_token_authentication_handler_for User
|
21
22
|
|
@@ -26,7 +27,9 @@ describe SimpleTokenAuthentication do
|
|
26
27
|
# and both identifier and authentication token are correct
|
27
28
|
allow(@controller).to receive(:find_record_from_identifier).and_return(@record)
|
28
29
|
allow(@controller).to receive(:token_correct?).and_return(true)
|
29
|
-
|
30
|
+
request = double()
|
31
|
+
allow(request).to receive(:env).and_return({})
|
32
|
+
allow(@controller).to receive(:request)
|
30
33
|
allow(@controller).to receive(:sign_in)
|
31
34
|
end
|
32
35
|
|
@@ -35,7 +38,7 @@ describe SimpleTokenAuthentication do
|
|
35
38
|
it 'instructs Devise to track token-authentication-related signins' do
|
36
39
|
allow(SimpleTokenAuthentication).to receive(:skip_devise_trackable).and_return(true)
|
37
40
|
|
38
|
-
expect(@controller).to receive_message_chain(:env, :[]=).with('devise.skip_trackable', true)
|
41
|
+
expect(@controller).to receive_message_chain(:request,:env, :[]=).with('devise.skip_trackable', true)
|
39
42
|
@controller.authenticate_user_from_token
|
40
43
|
end
|
41
44
|
end
|
@@ -45,13 +48,13 @@ describe SimpleTokenAuthentication do
|
|
45
48
|
it 'instructs Devise not to track token-authentication-related signins' do
|
46
49
|
allow(SimpleTokenAuthentication).to receive(:skip_devise_trackable).and_return(false)
|
47
50
|
|
48
|
-
expect(@controller).to receive_message_chain(:env, :[]=).with('devise.skip_trackable', false)
|
51
|
+
expect(@controller).to receive_message_chain(:request,:env, :[]=).with('devise.skip_trackable', false)
|
49
52
|
@controller.authenticate_user_from_token
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
53
56
|
|
54
|
-
it 'can be modified from an initializer file', public: true do
|
57
|
+
it 'can be modified from an initializer file', public: true, before_filter: true, before_action: true do
|
55
58
|
user = double()
|
56
59
|
stub_const('User', user)
|
57
60
|
allow(user).to receive(:name).and_return('User')
|
@@ -61,6 +64,7 @@ describe SimpleTokenAuthentication do
|
|
61
64
|
# given a controller class which acts as token authentication handler
|
62
65
|
controller_class = Class.new
|
63
66
|
allow(controller_class).to receive(:before_filter)
|
67
|
+
allow(controller_class).to receive(:before_action)
|
64
68
|
controller_class.send :extend, SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
|
65
69
|
|
66
70
|
allow(SimpleTokenAuthentication).to receive(:skip_devise_trackable).and_return('initial value')
|
@@ -78,7 +82,7 @@ describe SimpleTokenAuthentication do
|
|
78
82
|
# and both identifier and authentication token are correct
|
79
83
|
allow(@controller).to receive(:find_record_from_identifier).and_return(@record)
|
80
84
|
allow(@controller).to receive(:token_correct?).and_return(true)
|
81
|
-
allow(@controller).to receive(:
|
85
|
+
allow(@controller).to receive(:request).and_return({})
|
82
86
|
allow(@controller).to receive(:sign_in)
|
83
87
|
|
84
88
|
# even if modified *after* the class was loaded
|
@@ -86,7 +90,7 @@ describe SimpleTokenAuthentication do
|
|
86
90
|
|
87
91
|
# the option updated value is taken into account
|
88
92
|
# when token authentication is performed
|
89
|
-
expect(@controller).to receive_message_chain(:env, :[]=).with('devise.skip_trackable', 'updated value')
|
93
|
+
expect(@controller).to receive_message_chain(:request,:env, :[]=).with('devise.skip_trackable', 'updated value')
|
90
94
|
@controller.authenticate_user_from_token
|
91
95
|
end
|
92
96
|
end
|
@@ -10,8 +10,11 @@ describe SimpleTokenAuthentication::SignInHandler do
|
|
10
10
|
|
11
11
|
it 'delegates sign in to Devise::Controllers::SignInOut#sign_in through a controller', private: true do
|
12
12
|
controller = double()
|
13
|
+
env = double()
|
14
|
+
request = double()
|
15
|
+
allow(request).to receive(:env).and_return({})
|
16
|
+
allow(controller).to receive(:request).and_return(request)
|
13
17
|
allow(controller).to receive(:sign_in).with(:record, option: 'some_value').and_return('Devise response.')
|
14
|
-
allow(controller).to receive(:env).and_return({})
|
15
18
|
|
16
19
|
# delegating consists in sending the message
|
17
20
|
expect(controller).to receive(:sign_in)
|
@@ -42,7 +45,9 @@ describe SimpleTokenAuthentication::SignInHandler do
|
|
42
45
|
it 'ensures Devise trackable statistics are kept untouched', private: true do
|
43
46
|
controller = double()
|
44
47
|
env = double()
|
45
|
-
|
48
|
+
request = double()
|
49
|
+
allow(request).to receive(:env).and_return(env)
|
50
|
+
allow(controller).to receive(:request).and_return(request)
|
46
51
|
expect(env).to receive(:[]=).with('devise.skip_trackable', true)
|
47
52
|
|
48
53
|
sign_in_handler.send :integrate_with_devise_trackable!, controller
|
@@ -59,7 +64,9 @@ describe SimpleTokenAuthentication::SignInHandler do
|
|
59
64
|
it 'ensures Devise trackable statistics are updated', private: true do
|
60
65
|
controller = double()
|
61
66
|
env = double()
|
62
|
-
|
67
|
+
request = double()
|
68
|
+
allow(request).to receive(:env).and_return(env)
|
69
|
+
allow(controller).to receive(:request).and_return(request)
|
63
70
|
expect(env).to receive(:[]=).with('devise.skip_trackable', false)
|
64
71
|
|
65
72
|
sign_in_handler.send :integrate_with_devise_trackable!, controller
|
@@ -348,7 +348,7 @@ describe 'Any class which includes SimpleTokenAuthentication::TokenAuthenticatio
|
|
348
348
|
end
|
349
349
|
end
|
350
350
|
|
351
|
-
describe 'and which supports the :before_filter hook' do
|
351
|
+
describe 'and which supports the :before_filter hook', before_filter: true do
|
352
352
|
|
353
353
|
before(:each) do
|
354
354
|
allow(subject).to receive(:before_filter)
|
@@ -519,4 +519,176 @@ describe 'Any class which includes SimpleTokenAuthentication::TokenAuthenticatio
|
|
519
519
|
end
|
520
520
|
end
|
521
521
|
end
|
522
|
+
|
523
|
+
describe 'and which supports the :before_action hook', before_action: true do
|
524
|
+
|
525
|
+
before(:each) do
|
526
|
+
allow(subject).to receive(:before_action)
|
527
|
+
end
|
528
|
+
|
529
|
+
# User
|
530
|
+
|
531
|
+
context 'and which handles token authentication for User' do
|
532
|
+
|
533
|
+
before(:each) do
|
534
|
+
double_user_model
|
535
|
+
end
|
536
|
+
|
537
|
+
it 'ensures its instances require user to authenticate from token or any Devise strategy before any action', public: true do
|
538
|
+
expect(subject).to receive(:before_action).with(:authenticate_user_from_token!, {})
|
539
|
+
subject.handle_token_authentication_for User
|
540
|
+
end
|
541
|
+
|
542
|
+
context 'and disables the fallback to Devise authentication' do
|
543
|
+
|
544
|
+
let(:options) do
|
545
|
+
{ fallback_to_devise: false }
|
546
|
+
end
|
547
|
+
|
548
|
+
it 'ensures its instances require user to authenticate from token before any action', public: true do
|
549
|
+
expect(subject).to receive(:before_action).with(:authenticate_user_from_token, {})
|
550
|
+
subject.handle_token_authentication_for User, options
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
describe 'instance' do
|
555
|
+
|
556
|
+
before(:each) do
|
557
|
+
double_user_model
|
558
|
+
|
559
|
+
subject.class_eval do
|
560
|
+
handle_token_authentication_for User
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
it 'responds to :authenticate_user_from_token', protected: true do
|
565
|
+
expect(subject.new).to respond_to :authenticate_user_from_token
|
566
|
+
end
|
567
|
+
|
568
|
+
it 'responds to :authenticate_user_from_token!', protected: true do
|
569
|
+
expect(subject.new).to respond_to :authenticate_user_from_token!
|
570
|
+
end
|
571
|
+
|
572
|
+
it 'does not respond to :authenticate_super_admin_from_token', protected: true do
|
573
|
+
expect(subject.new).not_to respond_to :authenticate_super_admin_from_token
|
574
|
+
end
|
575
|
+
|
576
|
+
it 'does not respond to :authenticate_super_admin_from_token!', protected: true do
|
577
|
+
expect(subject.new).not_to respond_to :authenticate_super_admin_from_token!
|
578
|
+
end
|
579
|
+
end
|
580
|
+
end
|
581
|
+
|
582
|
+
# SuperAdmin
|
583
|
+
|
584
|
+
context 'and which handles token authentication for SuperAdmin' do
|
585
|
+
|
586
|
+
before(:each) do
|
587
|
+
double_super_admin_model
|
588
|
+
end
|
589
|
+
|
590
|
+
it 'ensures its instances require super_admin to authenticate from token or any Devise strategy before any action', public: true do
|
591
|
+
expect(subject).to receive(:before_action).with(:authenticate_super_admin_from_token!, {})
|
592
|
+
subject.handle_token_authentication_for SuperAdmin
|
593
|
+
end
|
594
|
+
|
595
|
+
context 'and disables the fallback to Devise authentication' do
|
596
|
+
|
597
|
+
let(:options) do
|
598
|
+
{ fallback_to_devise: false }
|
599
|
+
end
|
600
|
+
|
601
|
+
it 'ensures its instances require super_admin to authenticate from token before any action', public: true do
|
602
|
+
expect(subject).to receive(:before_action).with(:authenticate_super_admin_from_token, {})
|
603
|
+
subject.handle_token_authentication_for SuperAdmin, options
|
604
|
+
end
|
605
|
+
end
|
606
|
+
|
607
|
+
describe 'instance' do
|
608
|
+
|
609
|
+
before(:each) do
|
610
|
+
double_super_admin_model
|
611
|
+
|
612
|
+
subject.class_eval do
|
613
|
+
handle_token_authentication_for SuperAdmin
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
617
|
+
it 'responds to :authenticate_super_admin_from_token', protected: true do
|
618
|
+
expect(subject.new).to respond_to :authenticate_super_admin_from_token
|
619
|
+
end
|
620
|
+
|
621
|
+
it 'responds to :authenticate_super_admin_from_token!', protected: true do
|
622
|
+
expect(subject.new).to respond_to :authenticate_super_admin_from_token!
|
623
|
+
end
|
624
|
+
|
625
|
+
it 'does not respond to :authenticate_user_from_token', protected: true do
|
626
|
+
expect(subject.new).not_to respond_to :authenticate_user_from_token
|
627
|
+
end
|
628
|
+
|
629
|
+
it 'does not respond to :authenticate_user_from_token!', protected: true do
|
630
|
+
expect(subject.new).not_to respond_to :authenticate_user_from_token!
|
631
|
+
end
|
632
|
+
end
|
633
|
+
|
634
|
+
context 'with the :admin alias', token_authenticatable_aliases_option: true do
|
635
|
+
|
636
|
+
let(:options) do
|
637
|
+
{ 'as' => :admin }
|
638
|
+
end
|
639
|
+
|
640
|
+
it 'ensures its instances require admin to authenticate from token or any Devise strategy before any action', public: true do
|
641
|
+
expect(subject).to receive(:before_action).with(:authenticate_admin_from_token!, {})
|
642
|
+
subject.handle_token_authentication_for SuperAdmin, options
|
643
|
+
end
|
644
|
+
|
645
|
+
context 'and disables the fallback to Devise authentication' do
|
646
|
+
|
647
|
+
let(:options) do
|
648
|
+
{ as: 'admin', fallback_to_devise: false }
|
649
|
+
end
|
650
|
+
|
651
|
+
it 'ensures its instances require admin to authenticate from token before any action', public: true do
|
652
|
+
expect(subject).to receive(:before_action).with(:authenticate_admin_from_token, {})
|
653
|
+
subject.handle_token_authentication_for SuperAdmin, options
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
describe 'instance' do
|
658
|
+
|
659
|
+
before(:each) do
|
660
|
+
double_super_admin_model
|
661
|
+
|
662
|
+
subject.class_eval do
|
663
|
+
handle_token_authentication_for SuperAdmin, as: :admin
|
664
|
+
end
|
665
|
+
end
|
666
|
+
|
667
|
+
it 'responds to :authenticate_admin_from_token', protected: true do
|
668
|
+
expect(subject.new).to respond_to :authenticate_admin_from_token
|
669
|
+
end
|
670
|
+
|
671
|
+
it 'responds to :authenticate_admin_from_token!', protected: true do
|
672
|
+
expect(subject.new).to respond_to :authenticate_admin_from_token!
|
673
|
+
end
|
674
|
+
|
675
|
+
it 'does not respond to :authenticate_super_admin_from_token', protected: true do
|
676
|
+
expect(subject.new).not_to respond_to :authenticate_super_admin_from_token
|
677
|
+
end
|
678
|
+
|
679
|
+
it 'does not respond to :authenticate_super_admin_from_token!', protected: true do
|
680
|
+
expect(subject.new).not_to respond_to :authenticate_super_admin_from_token!
|
681
|
+
end
|
682
|
+
|
683
|
+
it 'does not respond to :authenticate_user_from_token', protected: true do
|
684
|
+
expect(subject.new).not_to respond_to :authenticate_user_from_token
|
685
|
+
end
|
686
|
+
|
687
|
+
it 'does not respond to :authenticate_user_from_token!', protected: true do
|
688
|
+
expect(subject.new).not_to respond_to :authenticate_user_from_token!
|
689
|
+
end
|
690
|
+
end
|
691
|
+
end
|
692
|
+
end
|
693
|
+
end
|
522
694
|
end
|
metadata
CHANGED
@@ -1,155 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_token_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Bulnes Guilpain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.6
|
20
|
-
- -
|
20
|
+
- - <
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.2.6
|
30
|
-
- -
|
30
|
+
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: actionpack
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ! '>='
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 3.2.6
|
40
|
-
- -
|
40
|
+
- - <
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '6'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ! '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 3.2.6
|
50
|
-
- -
|
50
|
+
- - <
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '6'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: devise
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ! '>='
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '3.2'
|
60
|
-
- -
|
60
|
+
- - <
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '6'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '3.2'
|
70
|
-
- -
|
70
|
+
- - <
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '6'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rspec
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '3.0'
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - ~>
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '3.0'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: inch
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0.4'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - ~>
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0.4'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: activerecord
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ! '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: 3.2.6
|
108
|
-
- -
|
108
|
+
- - <
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '6'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 3.2.6
|
118
|
-
- -
|
118
|
+
- - <
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
120
|
+
version: '6'
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: mongoid
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- -
|
125
|
+
- - ! '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: 3.1.0
|
128
|
-
- -
|
128
|
+
- - <
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '7'
|
131
131
|
type: :development
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- -
|
135
|
+
- - ! '>='
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: 3.1.0
|
138
|
-
- -
|
138
|
+
- - <
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
140
|
+
version: '7'
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: appraisal
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- -
|
145
|
+
- - ~>
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '2.0'
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
|
-
- -
|
152
|
+
- - ~>
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '2.0'
|
155
155
|
description:
|
@@ -166,7 +166,12 @@ files:
|
|
166
166
|
- Rakefile
|
167
167
|
- doc/README.md
|
168
168
|
- gemfiles/rails_4_devise_3.gemfile
|
169
|
+
- gemfiles/rails_4_devise_3.gemfile.lock
|
170
|
+
- gemfiles/rails_4_devise_4.gemfile.lock
|
171
|
+
- gemfiles/rails_5_devise_4.gemfile
|
172
|
+
- gemfiles/rails_5_devise_4.gemfile.lock
|
169
173
|
- gemfiles/ruby_1.9.3_rails_3.2.gemfile
|
174
|
+
- gemfiles/ruby_1.9.3_rails_3.2.gemfile.lock
|
170
175
|
- lib/simple_token_authentication.rb
|
171
176
|
- lib/simple_token_authentication/acts_as_token_authenticatable.rb
|
172
177
|
- lib/simple_token_authentication/acts_as_token_authentication_handler.rb
|
@@ -232,17 +237,17 @@ require_paths:
|
|
232
237
|
- lib
|
233
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
234
239
|
requirements:
|
235
|
-
- -
|
240
|
+
- - ! '>='
|
236
241
|
- !ruby/object:Gem::Version
|
237
242
|
version: '0'
|
238
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
244
|
requirements:
|
240
|
-
- -
|
245
|
+
- - ! '>='
|
241
246
|
- !ruby/object:Gem::Version
|
242
247
|
version: '0'
|
243
248
|
requirements: []
|
244
249
|
rubyforge_project:
|
245
|
-
rubygems_version: 2.
|
250
|
+
rubygems_version: 2.6.6
|
246
251
|
signing_key:
|
247
252
|
specification_version: 4
|
248
253
|
summary: Simple (but safe) token authentication for Rails apps or API with Devise.
|
@@ -283,6 +288,10 @@ test_files:
|
|
283
288
|
- spec/support/spec_for_token_generator_interface.rb
|
284
289
|
- spec/support/specs_for_token_authentication_handler_interface.rb
|
285
290
|
- gemfiles/rails_4_devise_3.gemfile
|
291
|
+
- gemfiles/rails_5_devise_4.gemfile
|
286
292
|
- gemfiles/ruby_1.9.3_rails_3.2.gemfile
|
293
|
+
- gemfiles/rails_4_devise_3.gemfile.lock
|
294
|
+
- gemfiles/rails_4_devise_4.gemfile.lock
|
295
|
+
- gemfiles/rails_5_devise_4.gemfile.lock
|
296
|
+
- gemfiles/ruby_1.9.3_rails_3.2.gemfile.lock
|
287
297
|
- Appraisals
|
288
|
-
has_rdoc:
|