cbsorcery 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. data/.document +5 -0
  2. data/.gitignore +56 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +40 -0
  5. data/CHANGELOG.md +263 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.md +360 -0
  9. data/Rakefile +6 -0
  10. data/gemfiles/active_record-rails40.gemfile +7 -0
  11. data/gemfiles/active_record-rails41.gemfile +7 -0
  12. data/lib/generators/sorcery/USAGE +22 -0
  13. data/lib/generators/sorcery/helpers.rb +40 -0
  14. data/lib/generators/sorcery/install_generator.rb +95 -0
  15. data/lib/generators/sorcery/templates/initializer.rb +451 -0
  16. data/lib/generators/sorcery/templates/migration/activity_logging.rb +10 -0
  17. data/lib/generators/sorcery/templates/migration/brute_force_protection.rb +9 -0
  18. data/lib/generators/sorcery/templates/migration/core.rb +13 -0
  19. data/lib/generators/sorcery/templates/migration/external.rb +12 -0
  20. data/lib/generators/sorcery/templates/migration/remember_me.rb +8 -0
  21. data/lib/generators/sorcery/templates/migration/reset_password.rb +9 -0
  22. data/lib/generators/sorcery/templates/migration/user_activation.rb +9 -0
  23. data/lib/sorcery.rb +85 -0
  24. data/lib/sorcery/adapters/active_record_adapter.rb +120 -0
  25. data/lib/sorcery/adapters/base_adapter.rb +30 -0
  26. data/lib/sorcery/controller.rb +157 -0
  27. data/lib/sorcery/controller/config.rb +65 -0
  28. data/lib/sorcery/controller/submodules/activity_logging.rb +82 -0
  29. data/lib/sorcery/controller/submodules/brute_force_protection.rb +38 -0
  30. data/lib/sorcery/controller/submodules/external.rb +199 -0
  31. data/lib/sorcery/controller/submodules/http_basic_auth.rb +74 -0
  32. data/lib/sorcery/controller/submodules/remember_me.rb +81 -0
  33. data/lib/sorcery/controller/submodules/session_timeout.rb +56 -0
  34. data/lib/sorcery/crypto_providers/aes256.rb +51 -0
  35. data/lib/sorcery/crypto_providers/bcrypt.rb +97 -0
  36. data/lib/sorcery/crypto_providers/common.rb +35 -0
  37. data/lib/sorcery/crypto_providers/md5.rb +19 -0
  38. data/lib/sorcery/crypto_providers/sha1.rb +28 -0
  39. data/lib/sorcery/crypto_providers/sha256.rb +36 -0
  40. data/lib/sorcery/crypto_providers/sha512.rb +36 -0
  41. data/lib/sorcery/engine.rb +21 -0
  42. data/lib/sorcery/model.rb +183 -0
  43. data/lib/sorcery/model/config.rb +96 -0
  44. data/lib/sorcery/model/submodules/activity_logging.rb +70 -0
  45. data/lib/sorcery/model/submodules/brute_force_protection.rb +125 -0
  46. data/lib/sorcery/model/submodules/external.rb +100 -0
  47. data/lib/sorcery/model/submodules/remember_me.rb +62 -0
  48. data/lib/sorcery/model/submodules/reset_password.rb +131 -0
  49. data/lib/sorcery/model/submodules/user_activation.rb +149 -0
  50. data/lib/sorcery/model/temporary_token.rb +30 -0
  51. data/lib/sorcery/protocols/certs/ca-bundle.crt +5182 -0
  52. data/lib/sorcery/protocols/oauth.rb +42 -0
  53. data/lib/sorcery/protocols/oauth2.rb +47 -0
  54. data/lib/sorcery/providers/base.rb +27 -0
  55. data/lib/sorcery/providers/facebook.rb +63 -0
  56. data/lib/sorcery/providers/github.rb +51 -0
  57. data/lib/sorcery/providers/google.rb +51 -0
  58. data/lib/sorcery/providers/jira.rb +77 -0
  59. data/lib/sorcery/providers/linkedin.rb +66 -0
  60. data/lib/sorcery/providers/liveid.rb +53 -0
  61. data/lib/sorcery/providers/twitter.rb +59 -0
  62. data/lib/sorcery/providers/vk.rb +63 -0
  63. data/lib/sorcery/providers/xing.rb +64 -0
  64. data/lib/sorcery/railties/tasks.rake +6 -0
  65. data/lib/sorcery/test_helpers/internal.rb +78 -0
  66. data/lib/sorcery/test_helpers/internal/rails.rb +68 -0
  67. data/lib/sorcery/test_helpers/rails/controller.rb +21 -0
  68. data/lib/sorcery/test_helpers/rails/integration.rb +26 -0
  69. data/lib/sorcery/version.rb +3 -0
  70. data/sorcery.gemspec +34 -0
  71. data/spec/active_record/user_activation_spec.rb +18 -0
  72. data/spec/active_record/user_activity_logging_spec.rb +17 -0
  73. data/spec/active_record/user_brute_force_protection_spec.rb +16 -0
  74. data/spec/active_record/user_oauth_spec.rb +16 -0
  75. data/spec/active_record/user_remember_me_spec.rb +16 -0
  76. data/spec/active_record/user_reset_password_spec.rb +16 -0
  77. data/spec/active_record/user_spec.rb +37 -0
  78. data/spec/controllers/controller_activity_logging_spec.rb +124 -0
  79. data/spec/controllers/controller_brute_force_protection_spec.rb +43 -0
  80. data/spec/controllers/controller_http_basic_auth_spec.rb +68 -0
  81. data/spec/controllers/controller_oauth2_spec.rb +407 -0
  82. data/spec/controllers/controller_oauth_spec.rb +240 -0
  83. data/spec/controllers/controller_remember_me_spec.rb +117 -0
  84. data/spec/controllers/controller_session_timeout_spec.rb +80 -0
  85. data/spec/controllers/controller_spec.rb +215 -0
  86. data/spec/orm/active_record.rb +21 -0
  87. data/spec/rails_app/app/active_record/authentication.rb +3 -0
  88. data/spec/rails_app/app/active_record/user.rb +5 -0
  89. data/spec/rails_app/app/active_record/user_provider.rb +3 -0
  90. data/spec/rails_app/app/controllers/sorcery_controller.rb +265 -0
  91. data/spec/rails_app/app/helpers/application_helper.rb +2 -0
  92. data/spec/rails_app/app/mailers/sorcery_mailer.rb +32 -0
  93. data/spec/rails_app/app/views/application/index.html.erb +17 -0
  94. data/spec/rails_app/app/views/layouts/application.html.erb +14 -0
  95. data/spec/rails_app/app/views/sorcery_mailer/activation_email.html.erb +17 -0
  96. data/spec/rails_app/app/views/sorcery_mailer/activation_email.text.erb +9 -0
  97. data/spec/rails_app/app/views/sorcery_mailer/activation_needed_email.html.erb +17 -0
  98. data/spec/rails_app/app/views/sorcery_mailer/activation_success_email.html.erb +17 -0
  99. data/spec/rails_app/app/views/sorcery_mailer/activation_success_email.text.erb +9 -0
  100. data/spec/rails_app/app/views/sorcery_mailer/reset_password_email.html.erb +16 -0
  101. data/spec/rails_app/app/views/sorcery_mailer/reset_password_email.text.erb +8 -0
  102. data/spec/rails_app/app/views/sorcery_mailer/send_unlock_token_email.text.erb +1 -0
  103. data/spec/rails_app/config.ru +4 -0
  104. data/spec/rails_app/config/application.rb +56 -0
  105. data/spec/rails_app/config/boot.rb +4 -0
  106. data/spec/rails_app/config/database.yml +22 -0
  107. data/spec/rails_app/config/environment.rb +5 -0
  108. data/spec/rails_app/config/environments/test.rb +37 -0
  109. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  110. data/spec/rails_app/config/initializers/inflections.rb +10 -0
  111. data/spec/rails_app/config/initializers/mime_types.rb +5 -0
  112. data/spec/rails_app/config/initializers/secret_token.rb +7 -0
  113. data/spec/rails_app/config/initializers/session_store.rb +12 -0
  114. data/spec/rails_app/config/locales/en.yml +5 -0
  115. data/spec/rails_app/config/routes.rb +48 -0
  116. data/spec/rails_app/db/migrate/activation/20101224223622_add_activation_to_users.rb +17 -0
  117. data/spec/rails_app/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb +19 -0
  118. data/spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb +13 -0
  119. data/spec/rails_app/db/migrate/core/20101224223620_create_users.rb +16 -0
  120. data/spec/rails_app/db/migrate/external/20101224223628_create_authentications_and_user_providers.rb +22 -0
  121. data/spec/rails_app/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb +15 -0
  122. data/spec/rails_app/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb +13 -0
  123. data/spec/rails_app/db/schema.rb +23 -0
  124. data/spec/rails_app/db/seeds.rb +7 -0
  125. data/spec/shared_examples/user_activation_shared_examples.rb +242 -0
  126. data/spec/shared_examples/user_activity_logging_shared_examples.rb +97 -0
  127. data/spec/shared_examples/user_brute_force_protection_shared_examples.rb +156 -0
  128. data/spec/shared_examples/user_oauth_shared_examples.rb +36 -0
  129. data/spec/shared_examples/user_remember_me_shared_examples.rb +57 -0
  130. data/spec/shared_examples/user_reset_password_shared_examples.rb +263 -0
  131. data/spec/shared_examples/user_shared_examples.rb +467 -0
  132. data/spec/sorcery_crypto_providers_spec.rb +198 -0
  133. data/spec/spec.opts +2 -0
  134. data/spec/spec_helper.rb +41 -0
  135. metadata +350 -0
@@ -0,0 +1,198 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Crypto Providers wrappers" do
4
+
5
+ describe Sorcery::CryptoProviders::MD5 do
6
+
7
+ after(:each) do
8
+ Sorcery::CryptoProviders::MD5.reset!
9
+ end
10
+
11
+ it "encrypt works via wrapper like normal lib" do
12
+ expect(Sorcery::CryptoProviders::MD5.encrypt 'Noam Ben-Ari').to eq Digest::MD5.hexdigest('Noam Ben-Ari')
13
+ end
14
+
15
+ it "works with multiple stretches" do
16
+ Sorcery::CryptoProviders::MD5.stretches = 3
17
+ expect(Sorcery::CryptoProviders::MD5.encrypt 'Noam Ben-Ari').to eq Digest::MD5.hexdigest(Digest::MD5.hexdigest(Digest::MD5.hexdigest('Noam Ben-Ari')))
18
+ end
19
+
20
+ it "matches? returns true when matches" do
21
+ expect(Sorcery::CryptoProviders::MD5.matches? Digest::MD5.hexdigest('Noam Ben-Ari'), 'Noam Ben-Ari').to be true
22
+ end
23
+
24
+ it "matches? returns false when no match" do
25
+ expect(Sorcery::CryptoProviders::MD5.matches? Digest::MD5.hexdigest('Noam Ben-Ari'), 'Some Dude').to be false
26
+ end
27
+
28
+ end
29
+
30
+ describe Sorcery::CryptoProviders::SHA1 do
31
+
32
+ before(:all) do
33
+ @digest = 'Noam Ben-Ari'
34
+ Sorcery::CryptoProviders::SHA1.stretches.times {@digest = Digest::SHA1.hexdigest(@digest)}
35
+ end
36
+
37
+ after(:each) do
38
+ Sorcery::CryptoProviders::SHA1.reset!
39
+ end
40
+
41
+ it "encrypt works via wrapper like normal lib" do
42
+ expect(Sorcery::CryptoProviders::SHA1.encrypt 'Noam Ben-Ari').to eq @digest
43
+ end
44
+
45
+ it "works with multiple stretches" do
46
+ Sorcery::CryptoProviders::SHA1.stretches = 3
47
+ expect(Sorcery::CryptoProviders::SHA1.encrypt 'Noam Ben-Ari').to eq Digest::SHA1.hexdigest(Digest::SHA1.hexdigest(Digest::SHA1.hexdigest('Noam Ben-Ari')))
48
+ end
49
+
50
+ it "matches? returns true when matches" do
51
+ expect(Sorcery::CryptoProviders::SHA1.matches? @digest, 'Noam Ben-Ari').to be true
52
+ end
53
+
54
+ it "matches? returns false when no match" do
55
+ expect(Sorcery::CryptoProviders::SHA1.matches? @digest, 'Some Dude').to be false
56
+ end
57
+
58
+ it "matches password encrypted using salt and join token from upstream" do
59
+ Sorcery::CryptoProviders::SHA1.join_token = "test"
60
+ expect(Sorcery::CryptoProviders::SHA1.encrypt ['password', 'gq18WBnJYNh2arkC1kgH']).to eq '894b5bf1643b8d0e1b2eaddb22426be7036dab70'
61
+ end
62
+ end
63
+
64
+ describe Sorcery::CryptoProviders::SHA256 do
65
+
66
+ before(:all) do
67
+ @digest = 'Noam Ben-Ari'
68
+ Sorcery::CryptoProviders::SHA256.stretches.times {@digest = Digest::SHA256.hexdigest(@digest)}
69
+ end
70
+
71
+ after(:each) do
72
+ Sorcery::CryptoProviders::SHA256.reset!
73
+ end
74
+
75
+ it "encrypt works via wrapper like normal lib" do
76
+ expect(Sorcery::CryptoProviders::SHA256.encrypt 'Noam Ben-Ari').to eq @digest
77
+ end
78
+
79
+ it "works with multiple stretches" do
80
+ Sorcery::CryptoProviders::SHA256.stretches = 3
81
+ expect(Sorcery::CryptoProviders::SHA256.encrypt 'Noam Ben-Ari').to eq Digest::SHA256.hexdigest(Digest::SHA256.hexdigest(Digest::SHA256.hexdigest('Noam Ben-Ari')))
82
+ end
83
+
84
+ it "matches? returns true when matches" do
85
+ expect(Sorcery::CryptoProviders::SHA256.matches? @digest, 'Noam Ben-Ari').to be true
86
+ end
87
+
88
+ it "matches? returns false when no match" do
89
+ expect(Sorcery::CryptoProviders::SHA256.matches? @digest, 'Some Dude').to be false
90
+ end
91
+
92
+ end
93
+
94
+ describe Sorcery::CryptoProviders::SHA512 do
95
+
96
+ before(:all) do
97
+ @digest = 'Noam Ben-Ari'
98
+ Sorcery::CryptoProviders::SHA512.stretches.times {@digest = Digest::SHA512.hexdigest(@digest)}
99
+ end
100
+
101
+ after(:each) do
102
+ Sorcery::CryptoProviders::SHA512.reset!
103
+ end
104
+
105
+ it "encrypt works via wrapper like normal lib" do
106
+ expect(Sorcery::CryptoProviders::SHA512.encrypt 'Noam Ben-Ari').to eq @digest
107
+ end
108
+
109
+ it "works with multiple stretches" do
110
+ Sorcery::CryptoProviders::SHA512.stretches = 3
111
+ expect(Sorcery::CryptoProviders::SHA512.encrypt 'Noam Ben-Ari').to eq Digest::SHA512.hexdigest(Digest::SHA512.hexdigest(Digest::SHA512.hexdigest('Noam Ben-Ari')))
112
+ end
113
+
114
+ it "matches? returns true when matches" do
115
+ expect(Sorcery::CryptoProviders::SHA512.matches? @digest, 'Noam Ben-Ari').to be true
116
+ end
117
+
118
+ it "matches? returns false when no match" do
119
+ expect(Sorcery::CryptoProviders::SHA512.matches? @digest, 'Some Dude').to be false
120
+ end
121
+
122
+ end
123
+
124
+ describe Sorcery::CryptoProviders::AES256 do
125
+
126
+ before(:all) do
127
+ aes = OpenSSL::Cipher::Cipher.new("AES-256-ECB")
128
+ aes.encrypt
129
+ @key = "asd234dfs423fddsmndsflktsdf32343"
130
+ aes.key = @key
131
+ @digest = 'Noam Ben-Ari'
132
+ @digest = [aes.update(@digest) + aes.final].pack("m").chomp
133
+ Sorcery::CryptoProviders::AES256.key = @key
134
+ end
135
+
136
+ it "encrypt works via wrapper like normal lib" do
137
+ expect(Sorcery::CryptoProviders::AES256.encrypt 'Noam Ben-Ari').to eq @digest
138
+ end
139
+
140
+ it "matches? returns true when matches" do
141
+ expect(Sorcery::CryptoProviders::AES256.matches? @digest, 'Noam Ben-Ari').to be true
142
+ end
143
+
144
+ it "matches? returns false when no match" do
145
+ expect(Sorcery::CryptoProviders::AES256.matches? @digest, 'Some Dude').to be false
146
+ end
147
+
148
+ it "can be decrypted" do
149
+ aes = OpenSSL::Cipher::Cipher.new("AES-256-ECB")
150
+ aes.decrypt
151
+ aes.key = @key
152
+ expect(aes.update(@digest.unpack("m").first) + aes.final).to eq "Noam Ben-Ari"
153
+ end
154
+
155
+ end
156
+
157
+ describe Sorcery::CryptoProviders::BCrypt do
158
+
159
+ before(:all) do
160
+ Sorcery::CryptoProviders::BCrypt.cost = 1
161
+ @digest = BCrypt::Password.create('Noam Ben-Ari', :cost => Sorcery::CryptoProviders::BCrypt.cost)
162
+ end
163
+
164
+ after(:each) do
165
+ Sorcery::CryptoProviders::BCrypt.reset!
166
+ end
167
+
168
+ it "is comparable with original secret" do
169
+ expect(BCrypt::Password.new Sorcery::CryptoProviders::BCrypt.encrypt('Noam Ben-Ari')).to eq 'Noam Ben-Ari'
170
+ end
171
+
172
+ it "works with multiple costs" do
173
+ Sorcery::CryptoProviders::BCrypt.cost = 3
174
+ expect(BCrypt::Password.new(Sorcery::CryptoProviders::BCrypt.encrypt 'Noam Ben-Ari')).to eq 'Noam Ben-Ari'
175
+ end
176
+
177
+ it "matches? returns true when matches" do
178
+ expect(Sorcery::CryptoProviders::BCrypt.matches? @digest, 'Noam Ben-Ari').to be true
179
+ end
180
+
181
+ it "matches? returns false when no match" do
182
+ expect(Sorcery::CryptoProviders::BCrypt.matches? @digest, 'Some Dude').to be false
183
+ end
184
+
185
+ it "respond_to?(:stretches) returns true" do
186
+ expect(Sorcery::CryptoProviders::BCrypt.respond_to? :stretches).to be true
187
+ end
188
+
189
+ it "sets cost when stretches is set" do
190
+ Sorcery::CryptoProviders::BCrypt.stretches = 4
191
+
192
+ # stubbed in Sorcery::TestHelpers::Internal
193
+ expect(Sorcery::CryptoProviders::BCrypt.cost).to eq 1
194
+ end
195
+
196
+ end
197
+
198
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1,41 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ ENV["RAILS_ENV"] ||= 'test'
5
+
6
+ SORCERY_ORM = :active_record
7
+
8
+ # require 'simplecov'
9
+ # SimpleCov.root File.join(File.dirname(__FILE__), '..', 'lib')
10
+ # SimpleCov.start
11
+
12
+ require 'rspec'
13
+
14
+ require 'rails/all'
15
+ require 'rspec/rails'
16
+ require 'timecop'
17
+
18
+ def setup_orm; end
19
+ def teardown_orm; end
20
+
21
+ require "orm/#{SORCERY_ORM}"
22
+
23
+ require "rails_app/config/environment"
24
+
25
+ class TestMailer < ActionMailer::Base;end
26
+
27
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
28
+
29
+ RSpec.configure do |config|
30
+ config.include RSpec::Rails::ControllerExampleGroup, :file_path => /controller(.)*_spec.rb$/
31
+ config.mock_with :rspec
32
+
33
+ config.use_transactional_fixtures = true
34
+
35
+ config.before(:suite) { setup_orm }
36
+ config.after(:suite) { teardown_orm }
37
+ config.before(:each) { ActionMailer::Base.deliveries.clear }
38
+
39
+ config.include ::Sorcery::TestHelpers::Internal
40
+ config.include ::Sorcery::TestHelpers::Internal::Rails
41
+ end
metadata ADDED
@@ -0,0 +1,350 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cbsorcery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.6
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Noam Ben Ari
9
+ - Kir Shatrov
10
+ - Grzegorz Witek
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2014-10-29 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: oauth
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: '0.4'
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.4.4
27
+ type: :runtime
28
+ prerelease: false
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '0.4'
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.4.4
38
+ - !ruby/object:Gem::Dependency
39
+ name: oauth2
40
+ requirement: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.8.0
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.8.0
54
+ - !ruby/object:Gem::Dependency
55
+ name: bcrypt
56
+ requirement: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '3.1'
70
+ - !ruby/object:Gem::Dependency
71
+ name: abstract
72
+ requirement: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 1.0.0
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 1.0.0
86
+ - !ruby/object:Gem::Dependency
87
+ name: json
88
+ requirement: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 1.7.7
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: 1.7.7
102
+ - !ruby/object:Gem::Dependency
103
+ name: yard
104
+ requirement: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.6.0
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 0.6.0
118
+ - !ruby/object:Gem::Dependency
119
+ name: timecop
120
+ requirement: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ type: :development
127
+ prerelease: false
128
+ version_requirements: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ - !ruby/object:Gem::Dependency
135
+ name: simplecov
136
+ requirement: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 0.3.8
142
+ type: :development
143
+ prerelease: false
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: 0.3.8
150
+ - !ruby/object:Gem::Dependency
151
+ name: rspec
152
+ requirement: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 3.0.0
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ~>
164
+ - !ruby/object:Gem::Version
165
+ version: 3.0.0
166
+ - !ruby/object:Gem::Dependency
167
+ name: rspec-rails
168
+ requirement: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: 3.0.0
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ~>
180
+ - !ruby/object:Gem::Version
181
+ version: 3.0.0
182
+ description: Provides common authentication needs such as signing in/out, activating
183
+ by email and resetting password.
184
+ email: nbenari@gmail.com
185
+ executables: []
186
+ extensions: []
187
+ extra_rdoc_files: []
188
+ files:
189
+ - .document
190
+ - .gitignore
191
+ - .rspec
192
+ - .travis.yml
193
+ - CHANGELOG.md
194
+ - Gemfile
195
+ - LICENSE.txt
196
+ - README.md
197
+ - Rakefile
198
+ - gemfiles/active_record-rails40.gemfile
199
+ - gemfiles/active_record-rails41.gemfile
200
+ - lib/generators/sorcery/USAGE
201
+ - lib/generators/sorcery/helpers.rb
202
+ - lib/generators/sorcery/install_generator.rb
203
+ - lib/generators/sorcery/templates/initializer.rb
204
+ - lib/generators/sorcery/templates/migration/activity_logging.rb
205
+ - lib/generators/sorcery/templates/migration/brute_force_protection.rb
206
+ - lib/generators/sorcery/templates/migration/core.rb
207
+ - lib/generators/sorcery/templates/migration/external.rb
208
+ - lib/generators/sorcery/templates/migration/remember_me.rb
209
+ - lib/generators/sorcery/templates/migration/reset_password.rb
210
+ - lib/generators/sorcery/templates/migration/user_activation.rb
211
+ - lib/sorcery.rb
212
+ - lib/sorcery/adapters/active_record_adapter.rb
213
+ - lib/sorcery/adapters/base_adapter.rb
214
+ - lib/sorcery/controller.rb
215
+ - lib/sorcery/controller/config.rb
216
+ - lib/sorcery/controller/submodules/activity_logging.rb
217
+ - lib/sorcery/controller/submodules/brute_force_protection.rb
218
+ - lib/sorcery/controller/submodules/external.rb
219
+ - lib/sorcery/controller/submodules/http_basic_auth.rb
220
+ - lib/sorcery/controller/submodules/remember_me.rb
221
+ - lib/sorcery/controller/submodules/session_timeout.rb
222
+ - lib/sorcery/crypto_providers/aes256.rb
223
+ - lib/sorcery/crypto_providers/bcrypt.rb
224
+ - lib/sorcery/crypto_providers/common.rb
225
+ - lib/sorcery/crypto_providers/md5.rb
226
+ - lib/sorcery/crypto_providers/sha1.rb
227
+ - lib/sorcery/crypto_providers/sha256.rb
228
+ - lib/sorcery/crypto_providers/sha512.rb
229
+ - lib/sorcery/engine.rb
230
+ - lib/sorcery/model.rb
231
+ - lib/sorcery/model/config.rb
232
+ - lib/sorcery/model/submodules/activity_logging.rb
233
+ - lib/sorcery/model/submodules/brute_force_protection.rb
234
+ - lib/sorcery/model/submodules/external.rb
235
+ - lib/sorcery/model/submodules/remember_me.rb
236
+ - lib/sorcery/model/submodules/reset_password.rb
237
+ - lib/sorcery/model/submodules/user_activation.rb
238
+ - lib/sorcery/model/temporary_token.rb
239
+ - lib/sorcery/protocols/certs/ca-bundle.crt
240
+ - lib/sorcery/protocols/oauth.rb
241
+ - lib/sorcery/protocols/oauth2.rb
242
+ - lib/sorcery/providers/base.rb
243
+ - lib/sorcery/providers/facebook.rb
244
+ - lib/sorcery/providers/github.rb
245
+ - lib/sorcery/providers/google.rb
246
+ - lib/sorcery/providers/jira.rb
247
+ - lib/sorcery/providers/linkedin.rb
248
+ - lib/sorcery/providers/liveid.rb
249
+ - lib/sorcery/providers/twitter.rb
250
+ - lib/sorcery/providers/vk.rb
251
+ - lib/sorcery/providers/xing.rb
252
+ - lib/sorcery/railties/tasks.rake
253
+ - lib/sorcery/test_helpers/internal.rb
254
+ - lib/sorcery/test_helpers/internal/rails.rb
255
+ - lib/sorcery/test_helpers/rails/controller.rb
256
+ - lib/sorcery/test_helpers/rails/integration.rb
257
+ - lib/sorcery/version.rb
258
+ - sorcery.gemspec
259
+ - spec/active_record/user_activation_spec.rb
260
+ - spec/active_record/user_activity_logging_spec.rb
261
+ - spec/active_record/user_brute_force_protection_spec.rb
262
+ - spec/active_record/user_oauth_spec.rb
263
+ - spec/active_record/user_remember_me_spec.rb
264
+ - spec/active_record/user_reset_password_spec.rb
265
+ - spec/active_record/user_spec.rb
266
+ - spec/controllers/controller_activity_logging_spec.rb
267
+ - spec/controllers/controller_brute_force_protection_spec.rb
268
+ - spec/controllers/controller_http_basic_auth_spec.rb
269
+ - spec/controllers/controller_oauth2_spec.rb
270
+ - spec/controllers/controller_oauth_spec.rb
271
+ - spec/controllers/controller_remember_me_spec.rb
272
+ - spec/controllers/controller_session_timeout_spec.rb
273
+ - spec/controllers/controller_spec.rb
274
+ - spec/orm/active_record.rb
275
+ - spec/rails_app/app/active_record/authentication.rb
276
+ - spec/rails_app/app/active_record/user.rb
277
+ - spec/rails_app/app/active_record/user_provider.rb
278
+ - spec/rails_app/app/controllers/sorcery_controller.rb
279
+ - spec/rails_app/app/helpers/application_helper.rb
280
+ - spec/rails_app/app/mailers/sorcery_mailer.rb
281
+ - spec/rails_app/app/views/application/index.html.erb
282
+ - spec/rails_app/app/views/layouts/application.html.erb
283
+ - spec/rails_app/app/views/sorcery_mailer/activation_email.html.erb
284
+ - spec/rails_app/app/views/sorcery_mailer/activation_email.text.erb
285
+ - spec/rails_app/app/views/sorcery_mailer/activation_needed_email.html.erb
286
+ - spec/rails_app/app/views/sorcery_mailer/activation_success_email.html.erb
287
+ - spec/rails_app/app/views/sorcery_mailer/activation_success_email.text.erb
288
+ - spec/rails_app/app/views/sorcery_mailer/reset_password_email.html.erb
289
+ - spec/rails_app/app/views/sorcery_mailer/reset_password_email.text.erb
290
+ - spec/rails_app/app/views/sorcery_mailer/send_unlock_token_email.text.erb
291
+ - spec/rails_app/config.ru
292
+ - spec/rails_app/config/application.rb
293
+ - spec/rails_app/config/boot.rb
294
+ - spec/rails_app/config/database.yml
295
+ - spec/rails_app/config/environment.rb
296
+ - spec/rails_app/config/environments/test.rb
297
+ - spec/rails_app/config/initializers/backtrace_silencers.rb
298
+ - spec/rails_app/config/initializers/inflections.rb
299
+ - spec/rails_app/config/initializers/mime_types.rb
300
+ - spec/rails_app/config/initializers/secret_token.rb
301
+ - spec/rails_app/config/initializers/session_store.rb
302
+ - spec/rails_app/config/locales/en.yml
303
+ - spec/rails_app/config/routes.rb
304
+ - spec/rails_app/db/migrate/activation/20101224223622_add_activation_to_users.rb
305
+ - spec/rails_app/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb
306
+ - spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
307
+ - spec/rails_app/db/migrate/core/20101224223620_create_users.rb
308
+ - spec/rails_app/db/migrate/external/20101224223628_create_authentications_and_user_providers.rb
309
+ - spec/rails_app/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb
310
+ - spec/rails_app/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb
311
+ - spec/rails_app/db/schema.rb
312
+ - spec/rails_app/db/seeds.rb
313
+ - spec/rails_app/log/development.log
314
+ - spec/shared_examples/user_activation_shared_examples.rb
315
+ - spec/shared_examples/user_activity_logging_shared_examples.rb
316
+ - spec/shared_examples/user_brute_force_protection_shared_examples.rb
317
+ - spec/shared_examples/user_oauth_shared_examples.rb
318
+ - spec/shared_examples/user_remember_me_shared_examples.rb
319
+ - spec/shared_examples/user_reset_password_shared_examples.rb
320
+ - spec/shared_examples/user_shared_examples.rb
321
+ - spec/sorcery_crypto_providers_spec.rb
322
+ - spec/spec.opts
323
+ - spec/spec_helper.rb
324
+ homepage: http://github.com/NoamB/sorcery
325
+ licenses:
326
+ - MIT
327
+ post_install_message:
328
+ rdoc_options: []
329
+ require_paths:
330
+ - lib
331
+ required_ruby_version: !ruby/object:Gem::Requirement
332
+ none: false
333
+ requirements:
334
+ - - ! '>='
335
+ - !ruby/object:Gem::Version
336
+ version: 1.9.3
337
+ required_rubygems_version: !ruby/object:Gem::Requirement
338
+ none: false
339
+ requirements:
340
+ - - ! '>='
341
+ - !ruby/object:Gem::Version
342
+ version: '0'
343
+ requirements: []
344
+ rubyforge_project:
345
+ rubygems_version: 1.8.23
346
+ signing_key:
347
+ specification_version: 3
348
+ summary: Magical authentication for Rails 3 & 4 applications
349
+ test_files: []
350
+ has_rdoc: