sorcery 0.8.2 → 0.9.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 +7 -0
- data/.gitignore +56 -0
- data/.travis.yml +130 -1
- data/CHANGELOG.md +270 -0
- data/Gemfile +17 -22
- data/README.md +371 -0
- data/Rakefile +3 -79
- data/gemfiles/active_record-rails40.gemfile +7 -0
- data/gemfiles/active_record-rails41.gemfile +7 -0
- data/gemfiles/mongo_mapper-rails40.gemfile +9 -0
- data/gemfiles/mongo_mapper-rails41.gemfile +9 -0
- data/gemfiles/mongoid-rails40.gemfile +9 -0
- data/gemfiles/mongoid-rails41.gemfile +9 -0
- data/gemfiles/mongoid3-rails32.gemfile +9 -0
- data/lib/generators/sorcery/USAGE +1 -1
- data/lib/generators/sorcery/helpers.rb +40 -0
- data/lib/generators/sorcery/install_generator.rb +38 -20
- data/lib/generators/sorcery/templates/initializer.rb +35 -10
- data/lib/generators/sorcery/templates/migration/activity_logging.rb +2 -11
- data/lib/generators/sorcery/templates/migration/brute_force_protection.rb +3 -7
- data/lib/generators/sorcery/templates/migration/core.rb +5 -8
- data/lib/generators/sorcery/templates/migration/external.rb +3 -5
- data/lib/generators/sorcery/templates/migration/remember_me.rb +2 -9
- data/lib/generators/sorcery/templates/migration/reset_password.rb +2 -10
- data/lib/generators/sorcery/templates/migration/user_activation.rb +2 -10
- data/lib/sorcery/adapters/active_record_adapter.rb +120 -0
- data/lib/sorcery/adapters/base_adapter.rb +30 -0
- data/lib/sorcery/adapters/data_mapper_adapter.rb +176 -0
- data/lib/sorcery/adapters/mongo_mapper_adapter.rb +110 -0
- data/lib/sorcery/adapters/mongoid_adapter.rb +97 -0
- data/lib/sorcery/controller/config.rb +65 -0
- data/lib/sorcery/controller/submodules/activity_logging.rb +16 -21
- data/lib/sorcery/controller/submodules/brute_force_protection.rb +6 -6
- data/lib/sorcery/controller/submodules/external.rb +42 -43
- data/lib/sorcery/controller/submodules/remember_me.rb +5 -5
- data/lib/sorcery/controller/submodules/session_timeout.rb +11 -7
- data/lib/sorcery/controller.rb +22 -74
- data/lib/sorcery/model/config.rb +96 -0
- data/lib/sorcery/model/submodules/activity_logging.rb +30 -13
- data/lib/sorcery/model/submodules/brute_force_protection.rb +25 -27
- data/lib/sorcery/model/submodules/external.rb +53 -9
- data/lib/sorcery/model/submodules/remember_me.rb +15 -19
- data/lib/sorcery/model/submodules/reset_password.rb +36 -33
- data/lib/sorcery/model/submodules/user_activation.rb +51 -48
- data/lib/sorcery/model/temporary_token.rb +4 -4
- data/lib/sorcery/model.rb +81 -175
- data/lib/sorcery/protocols/oauth.rb +42 -0
- data/lib/sorcery/protocols/oauth2.rb +47 -0
- data/lib/sorcery/providers/base.rb +38 -0
- data/lib/sorcery/providers/facebook.rb +63 -0
- data/lib/sorcery/providers/github.rb +51 -0
- data/lib/sorcery/providers/google.rb +51 -0
- data/lib/sorcery/providers/heroku.rb +57 -0
- data/lib/sorcery/providers/jira.rb +77 -0
- data/lib/sorcery/providers/linkedin.rb +66 -0
- data/lib/sorcery/providers/liveid.rb +53 -0
- data/lib/sorcery/providers/salesforce.rb +50 -0
- data/lib/sorcery/providers/twitter.rb +59 -0
- data/lib/sorcery/providers/vk.rb +63 -0
- data/lib/sorcery/providers/xing.rb +64 -0
- data/lib/sorcery/test_helpers/internal/rails.rb +17 -6
- data/lib/sorcery/test_helpers/internal.rb +27 -6
- data/lib/sorcery/test_helpers/rails/controller.rb +21 -0
- data/lib/sorcery/test_helpers/rails/integration.rb +26 -0
- data/lib/sorcery/version.rb +3 -0
- data/lib/sorcery.rb +82 -58
- data/sorcery.gemspec +24 -362
- data/spec/active_record/user_activation_spec.rb +18 -0
- data/spec/active_record/user_activity_logging_spec.rb +17 -0
- data/spec/{rails3/spec → active_record}/user_brute_force_protection_spec.rb +6 -5
- data/spec/{rails3/spec → active_record}/user_oauth_spec.rb +6 -5
- data/spec/{rails3/spec → active_record}/user_remember_me_spec.rb +5 -4
- data/spec/{rails3/spec → active_record}/user_reset_password_spec.rb +7 -7
- data/spec/active_record/user_spec.rb +37 -0
- data/spec/controllers/controller_activity_logging_spec.rb +124 -0
- data/spec/controllers/controller_brute_force_protection_spec.rb +43 -0
- data/spec/controllers/controller_http_basic_auth_spec.rb +68 -0
- data/spec/controllers/controller_oauth2_spec.rb +414 -0
- data/spec/controllers/controller_oauth_spec.rb +240 -0
- data/spec/controllers/controller_remember_me_spec.rb +117 -0
- data/spec/controllers/controller_session_timeout_spec.rb +80 -0
- data/spec/controllers/controller_spec.rb +218 -0
- data/spec/data_mapper/user_activation_spec.rb +10 -0
- data/spec/data_mapper/user_activity_logging_spec.rb +14 -0
- data/spec/data_mapper/user_brute_force_protection_spec.rb +9 -0
- data/spec/data_mapper/user_oauth_spec.rb +9 -0
- data/spec/data_mapper/user_remember_me_spec.rb +8 -0
- data/spec/data_mapper/user_reset_password_spec.rb +8 -0
- data/spec/data_mapper/user_spec.rb +27 -0
- data/spec/mongo_mapper/user_activation_spec.rb +9 -0
- data/spec/mongo_mapper/user_activity_logging_spec.rb +8 -0
- data/spec/mongo_mapper/user_brute_force_protection_spec.rb +8 -0
- data/spec/mongo_mapper/user_oauth_spec.rb +8 -0
- data/spec/mongo_mapper/user_remember_me_spec.rb +8 -0
- data/spec/mongo_mapper/user_reset_password_spec.rb +8 -0
- data/spec/mongo_mapper/user_spec.rb +37 -0
- data/spec/mongoid/user_activation_spec.rb +9 -0
- data/spec/mongoid/user_activity_logging_spec.rb +8 -0
- data/spec/mongoid/user_brute_force_protection_spec.rb +8 -0
- data/spec/mongoid/user_oauth_spec.rb +8 -0
- data/spec/mongoid/user_remember_me_spec.rb +8 -0
- data/spec/mongoid/user_reset_password_spec.rb +8 -0
- data/spec/mongoid/user_spec.rb +51 -0
- data/spec/orm/active_record.rb +21 -0
- data/spec/orm/data_mapper.rb +48 -0
- data/spec/orm/mongo_mapper.rb +10 -0
- data/spec/orm/mongoid.rb +22 -0
- data/spec/{rails3/app/models → rails_app/app/active_record}/user.rb +1 -2
- data/spec/rails_app/app/active_record/user_provider.rb +3 -0
- data/spec/rails_app/app/controllers/sorcery_controller.rb +285 -0
- data/spec/rails_app/app/data_mapper/authentication.rb +8 -0
- data/spec/rails_app/app/data_mapper/user.rb +7 -0
- data/spec/{rails3_mongo_mapper/app/models → rails_app/app/mongo_mapper}/user.rb +2 -0
- data/spec/{rails3_mongoid/app/models → rails_app/app/mongoid}/user.rb +2 -0
- data/spec/{rails3_mongo_mapper → rails_app}/config/application.rb +13 -8
- data/spec/rails_app/config/boot.rb +4 -0
- data/spec/rails_app/config/database.yml +22 -0
- data/spec/{rails3_mongo_mapper → rails_app}/config/environments/test.rb +2 -0
- data/spec/{rails3_mongoid → rails_app}/config/initializers/session_store.rb +4 -0
- data/spec/rails_app/config/routes.rb +51 -0
- data/spec/{rails3_mongo_mapper → rails_app}/config.ru +1 -1
- data/spec/{rails3 → rails_app}/db/migrate/activation/20101224223622_add_activation_to_users.rb +3 -3
- data/spec/{rails3 → rails_app}/db/migrate/core/20101224223620_create_users.rb +2 -2
- data/spec/rails_app/db/migrate/external/20101224223628_create_authentications_and_user_providers.rb +22 -0
- data/spec/rails_app/log/development.log +1791 -0
- data/spec/shared_examples/user_activation_shared_examples.rb +137 -98
- data/spec/shared_examples/user_activity_logging_shared_examples.rb +83 -15
- data/spec/shared_examples/user_brute_force_protection_shared_examples.rb +140 -21
- data/spec/shared_examples/user_oauth_shared_examples.rb +21 -16
- data/spec/shared_examples/user_remember_me_shared_examples.rb +36 -24
- data/spec/shared_examples/user_reset_password_shared_examples.rb +163 -130
- data/spec/shared_examples/user_shared_examples.rb +355 -193
- data/spec/sorcery_crypto_providers_spec.rb +74 -72
- data/spec/spec_helper.rb +32 -4
- metadata +262 -508
- data/Gemfile.lock +0 -175
- data/README.rdoc +0 -261
- data/VERSION +0 -1
- data/lib/sorcery/controller/submodules/external/protocols/oauth1.rb +0 -46
- data/lib/sorcery/controller/submodules/external/protocols/oauth2.rb +0 -49
- data/lib/sorcery/controller/submodules/external/providers/base.rb +0 -21
- data/lib/sorcery/controller/submodules/external/providers/facebook.rb +0 -98
- data/lib/sorcery/controller/submodules/external/providers/github.rb +0 -92
- data/lib/sorcery/controller/submodules/external/providers/google.rb +0 -91
- data/lib/sorcery/controller/submodules/external/providers/linkedin.rb +0 -102
- data/lib/sorcery/controller/submodules/external/providers/liveid.rb +0 -92
- data/lib/sorcery/controller/submodules/external/providers/twitter.rb +0 -93
- data/lib/sorcery/controller/submodules/external/providers/vk.rb +0 -100
- data/lib/sorcery/controller/submodules/external/providers/xing.rb +0 -97
- data/lib/sorcery/model/adapters/active_record.rb +0 -49
- data/lib/sorcery/model/adapters/mongo_mapper.rb +0 -56
- data/lib/sorcery/model/adapters/mongoid.rb +0 -88
- data/lib/sorcery/test_helpers/rails.rb +0 -16
- data/lib/sorcery/test_helpers.rb +0 -5
- data/spec/Gemfile +0 -12
- data/spec/Gemfile.lock +0 -129
- data/spec/README.md +0 -31
- data/spec/Rakefile +0 -12
- data/spec/rails3/.gitignore +0 -4
- data/spec/rails3/.rspec +0 -1
- data/spec/rails3/Gemfile +0 -15
- data/spec/rails3/Gemfile.lock +0 -162
- data/spec/rails3/README +0 -256
- data/spec/rails3/Rakefile +0 -11
- data/spec/rails3/app/controllers/application_controller.rb +0 -208
- data/spec/rails3/config/application.rb +0 -46
- data/spec/rails3/config/boot.rb +0 -13
- data/spec/rails3/config/database.yml +0 -27
- data/spec/rails3/config/environments/development.rb +0 -26
- data/spec/rails3/config/environments/in_memory.rb +0 -35
- data/spec/rails3/config/environments/production.rb +0 -49
- data/spec/rails3/config/environments/test.rb +0 -35
- data/spec/rails3/config/initializers/session_store.rb +0 -8
- data/spec/rails3/config/routes.rb +0 -59
- data/spec/rails3/config.ru +0 -4
- data/spec/rails3/db/migrate/external/20101224223628_create_authentications.rb +0 -14
- data/spec/rails3/lib/tasks/.gitkeep +0 -0
- data/spec/rails3/public/404.html +0 -26
- data/spec/rails3/public/422.html +0 -26
- data/spec/rails3/public/500.html +0 -26
- data/spec/rails3/public/favicon.ico +0 -0
- data/spec/rails3/public/images/rails.png +0 -0
- data/spec/rails3/public/javascripts/application.js +0 -2
- data/spec/rails3/public/javascripts/controls.js +0 -965
- data/spec/rails3/public/javascripts/dragdrop.js +0 -974
- data/spec/rails3/public/javascripts/effects.js +0 -1123
- data/spec/rails3/public/javascripts/prototype.js +0 -6001
- data/spec/rails3/public/javascripts/rails.js +0 -175
- data/spec/rails3/public/robots.txt +0 -5
- data/spec/rails3/public/stylesheets/.gitkeep +0 -0
- data/spec/rails3/script/rails +0 -6
- data/spec/rails3/spec/controller_activity_logging_spec.rb +0 -130
- data/spec/rails3/spec/controller_brute_force_protection_spec.rb +0 -96
- data/spec/rails3/spec/controller_http_basic_auth_spec.rb +0 -50
- data/spec/rails3/spec/controller_oauth2_spec.rb +0 -380
- data/spec/rails3/spec/controller_oauth_spec.rb +0 -206
- data/spec/rails3/spec/controller_remember_me_spec.rb +0 -96
- data/spec/rails3/spec/controller_session_timeout_spec.rb +0 -55
- data/spec/rails3/spec/controller_spec.rb +0 -182
- data/spec/rails3/spec/integration_spec.rb +0 -23
- data/spec/rails3/spec/spec.opts +0 -2
- data/spec/rails3/spec/spec_helper.orig.rb +0 -27
- data/spec/rails3/spec/spec_helper.rb +0 -71
- data/spec/rails3/spec/user_activation_spec.rb +0 -16
- data/spec/rails3/spec/user_activity_logging_spec.rb +0 -8
- data/spec/rails3/spec/user_spec.rb +0 -36
- data/spec/rails3/vendor/plugins/.gitkeep +0 -0
- data/spec/rails3_mongo_mapper/.gitignore +0 -4
- data/spec/rails3_mongo_mapper/.rspec +0 -1
- data/spec/rails3_mongo_mapper/Gemfile +0 -16
- data/spec/rails3_mongo_mapper/Gemfile.lock +0 -156
- data/spec/rails3_mongo_mapper/Rakefile +0 -11
- data/spec/rails3_mongo_mapper/app/controllers/application_controller.rb +0 -122
- data/spec/rails3_mongo_mapper/app/helpers/application_helper.rb +0 -2
- data/spec/rails3_mongo_mapper/app/mailers/sorcery_mailer.rb +0 -25
- data/spec/rails3_mongo_mapper/app/views/layouts/application.html.erb +0 -14
- data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.html.erb +0 -17
- data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.text.erb +0 -9
- data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_success_email.text.erb +0 -9
- data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.html.erb +0 -16
- data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.text.erb +0 -8
- data/spec/rails3_mongo_mapper/config/boot.rb +0 -13
- data/spec/rails3_mongo_mapper/config/environment.rb +0 -5
- data/spec/rails3_mongo_mapper/config/environments/development.rb +0 -30
- data/spec/rails3_mongo_mapper/config/environments/in_memory.rb +0 -0
- data/spec/rails3_mongo_mapper/config/environments/production.rb +0 -49
- data/spec/rails3_mongo_mapper/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails3_mongo_mapper/config/initializers/inflections.rb +0 -10
- data/spec/rails3_mongo_mapper/config/initializers/mime_types.rb +0 -5
- data/spec/rails3_mongo_mapper/config/initializers/mongo.rb +0 -2
- data/spec/rails3_mongo_mapper/config/initializers/secret_token.rb +0 -7
- data/spec/rails3_mongo_mapper/config/initializers/session_store.rb +0 -8
- data/spec/rails3_mongo_mapper/config/locales/en.yml +0 -5
- data/spec/rails3_mongo_mapper/config/routes.rb +0 -59
- data/spec/rails3_mongo_mapper/db/schema.rb +0 -23
- data/spec/rails3_mongo_mapper/db/seeds.rb +0 -7
- data/spec/rails3_mongo_mapper/lib/tasks/.gitkeep +0 -0
- data/spec/rails3_mongo_mapper/public/404.html +0 -26
- data/spec/rails3_mongo_mapper/public/422.html +0 -26
- data/spec/rails3_mongo_mapper/public/500.html +0 -26
- data/spec/rails3_mongo_mapper/public/favicon.ico +0 -0
- data/spec/rails3_mongo_mapper/public/images/rails.png +0 -0
- data/spec/rails3_mongo_mapper/public/javascripts/application.js +0 -2
- data/spec/rails3_mongo_mapper/public/javascripts/controls.js +0 -965
- data/spec/rails3_mongo_mapper/public/javascripts/dragdrop.js +0 -974
- data/spec/rails3_mongo_mapper/public/javascripts/effects.js +0 -1123
- data/spec/rails3_mongo_mapper/public/javascripts/prototype.js +0 -6001
- data/spec/rails3_mongo_mapper/public/javascripts/rails.js +0 -175
- data/spec/rails3_mongo_mapper/public/robots.txt +0 -5
- data/spec/rails3_mongo_mapper/public/stylesheets/.gitkeep +0 -0
- data/spec/rails3_mongo_mapper/script/rails +0 -6
- data/spec/rails3_mongo_mapper/spec/controller_spec.rb +0 -175
- data/spec/rails3_mongo_mapper/spec/spec.opts +0 -2
- data/spec/rails3_mongo_mapper/spec/spec_helper.orig.rb +0 -27
- data/spec/rails3_mongo_mapper/spec/spec_helper.rb +0 -55
- data/spec/rails3_mongo_mapper/spec/user_activation_spec.rb +0 -9
- data/spec/rails3_mongo_mapper/spec/user_activity_logging_spec.rb +0 -8
- data/spec/rails3_mongo_mapper/spec/user_brute_force_protection_spec.rb +0 -8
- data/spec/rails3_mongo_mapper/spec/user_oauth_spec.rb +0 -8
- data/spec/rails3_mongo_mapper/spec/user_remember_me_spec.rb +0 -8
- data/spec/rails3_mongo_mapper/spec/user_reset_password_spec.rb +0 -8
- data/spec/rails3_mongo_mapper/spec/user_spec.rb +0 -37
- data/spec/rails3_mongo_mapper/vendor/plugins/.gitkeep +0 -0
- data/spec/rails3_mongoid/.gitignore +0 -4
- data/spec/rails3_mongoid/.rspec +0 -1
- data/spec/rails3_mongoid/Gemfile +0 -15
- data/spec/rails3_mongoid/Gemfile.lock +0 -146
- data/spec/rails3_mongoid/Rakefile +0 -11
- data/spec/rails3_mongoid/app/controllers/application_controller.rb +0 -127
- data/spec/rails3_mongoid/app/helpers/application_helper.rb +0 -2
- data/spec/rails3_mongoid/app/mailers/sorcery_mailer.rb +0 -25
- data/spec/rails3_mongoid/app/views/layouts/application.html.erb +0 -14
- data/spec/rails3_mongoid/app/views/sorcery_mailer/activation_email.html.erb +0 -17
- data/spec/rails3_mongoid/app/views/sorcery_mailer/activation_email.text.erb +0 -9
- data/spec/rails3_mongoid/app/views/sorcery_mailer/activation_success_email.html.erb +0 -17
- data/spec/rails3_mongoid/app/views/sorcery_mailer/activation_success_email.text.erb +0 -9
- data/spec/rails3_mongoid/app/views/sorcery_mailer/reset_password_email.html.erb +0 -16
- data/spec/rails3_mongoid/app/views/sorcery_mailer/reset_password_email.text.erb +0 -8
- data/spec/rails3_mongoid/config/application.rb +0 -51
- data/spec/rails3_mongoid/config/boot.rb +0 -13
- data/spec/rails3_mongoid/config/environment.rb +0 -5
- data/spec/rails3_mongoid/config/environments/development.rb +0 -26
- data/spec/rails3_mongoid/config/environments/in_memory.rb +0 -0
- data/spec/rails3_mongoid/config/environments/production.rb +0 -49
- data/spec/rails3_mongoid/config/environments/test.rb +0 -35
- data/spec/rails3_mongoid/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails3_mongoid/config/initializers/inflections.rb +0 -10
- data/spec/rails3_mongoid/config/initializers/mime_types.rb +0 -5
- data/spec/rails3_mongoid/config/initializers/secret_token.rb +0 -7
- data/spec/rails3_mongoid/config/locales/en.yml +0 -5
- data/spec/rails3_mongoid/config/mongoid.yml +0 -7
- data/spec/rails3_mongoid/config/routes.rb +0 -59
- data/spec/rails3_mongoid/config.ru +0 -4
- data/spec/rails3_mongoid/db/schema.rb +0 -23
- data/spec/rails3_mongoid/db/seeds.rb +0 -7
- data/spec/rails3_mongoid/lib/tasks/.gitkeep +0 -0
- data/spec/rails3_mongoid/public/404.html +0 -26
- data/spec/rails3_mongoid/public/422.html +0 -26
- data/spec/rails3_mongoid/public/500.html +0 -26
- data/spec/rails3_mongoid/public/favicon.ico +0 -0
- data/spec/rails3_mongoid/public/images/rails.png +0 -0
- data/spec/rails3_mongoid/public/javascripts/application.js +0 -2
- data/spec/rails3_mongoid/public/javascripts/controls.js +0 -965
- data/spec/rails3_mongoid/public/javascripts/dragdrop.js +0 -974
- data/spec/rails3_mongoid/public/javascripts/effects.js +0 -1123
- data/spec/rails3_mongoid/public/javascripts/prototype.js +0 -6001
- data/spec/rails3_mongoid/public/javascripts/rails.js +0 -175
- data/spec/rails3_mongoid/public/robots.txt +0 -5
- data/spec/rails3_mongoid/public/stylesheets/.gitkeep +0 -0
- data/spec/rails3_mongoid/script/rails +0 -6
- data/spec/rails3_mongoid/spec/controller_activity_logging_spec.rb +0 -111
- data/spec/rails3_mongoid/spec/controller_spec.rb +0 -186
- data/spec/rails3_mongoid/spec/spec.opts +0 -2
- data/spec/rails3_mongoid/spec/spec_helper.orig.rb +0 -27
- data/spec/rails3_mongoid/spec/spec_helper.rb +0 -55
- data/spec/rails3_mongoid/spec/user_activation_spec.rb +0 -9
- data/spec/rails3_mongoid/spec/user_activity_logging_spec.rb +0 -8
- data/spec/rails3_mongoid/spec/user_brute_force_protection_spec.rb +0 -8
- data/spec/rails3_mongoid/spec/user_oauth_spec.rb +0 -8
- data/spec/rails3_mongoid/spec/user_remember_me_spec.rb +0 -8
- data/spec/rails3_mongoid/spec/user_reset_password_spec.rb +0 -8
- data/spec/rails3_mongoid/spec/user_spec.rb +0 -38
- data/spec/rails3_mongoid/vendor/plugins/.gitkeep +0 -0
- data/spec/shared_examples/controller_oauth2_shared_examples.rb +0 -56
- data/spec/shared_examples/controller_oauth_shared_examples.rb +0 -55
- /data/lib/sorcery/{controller/submodules/external/protocols → protocols}/certs/ca-bundle.crt +0 -0
- /data/spec/{rails3/app/models → rails_app/app/active_record}/authentication.rb +0 -0
- /data/spec/{rails3 → rails_app}/app/helpers/application_helper.rb +0 -0
- /data/spec/{rails3 → rails_app}/app/mailers/sorcery_mailer.rb +0 -0
- /data/spec/{rails3_mongo_mapper/app/models → rails_app/app/mongo_mapper}/authentication.rb +0 -0
- /data/spec/{rails3_mongoid/app/models → rails_app/app/mongoid}/authentication.rb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/application/index.html.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/layouts/application.html.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/activation_email.html.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/activation_email.text.erb +0 -0
- /data/spec/{rails3/app/views/sorcery_mailer/activation_success_email.html.erb → rails_app/app/views/sorcery_mailer/activation_needed_email.html.erb} +0 -0
- /data/spec/{rails3_mongo_mapper → rails_app}/app/views/sorcery_mailer/activation_success_email.html.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/activation_success_email.text.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/reset_password_email.html.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/reset_password_email.text.erb +0 -0
- /data/spec/{rails3 → rails_app}/app/views/sorcery_mailer/send_unlock_token_email.text.erb +0 -0
- /data/spec/{rails3 → rails_app}/config/environment.rb +0 -0
- /data/spec/{rails3 → rails_app}/config/initializers/backtrace_silencers.rb +0 -0
- /data/spec/{rails3 → rails_app}/config/initializers/inflections.rb +0 -0
- /data/spec/{rails3 → rails_app}/config/initializers/mime_types.rb +0 -0
- /data/spec/{rails3 → rails_app}/config/initializers/secret_token.rb +0 -0
- /data/spec/{rails3 → rails_app}/config/locales/en.yml +0 -0
- /data/spec/{rails3 → rails_app}/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb +0 -0
- /data/spec/{rails3 → rails_app}/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb +0 -0
- /data/spec/{rails3 → rails_app}/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb +0 -0
- /data/spec/{rails3 → rails_app}/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb +0 -0
- /data/spec/{rails3 → rails_app}/db/schema.rb +0 -0
- /data/spec/{rails3 → rails_app}/db/seeds.rb +0 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: f79fec92f71b24d1507e3848c0c943e3b8e7a6ed
|
|
4
|
+
data.tar.gz: bf2cfc0eb30778fbb3eb85f896a9b73811a179c4
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d48170391dc1db75bb8bc88ce444ecc8d957796e0aaf96c29cafc4a01493689bc52e47ecaa5c0968c3aced147d623d2623f9dbe56e3dfdf46bf5309b005345f6
|
|
7
|
+
data.tar.gz: 4101544b567f3cb86c02bda20721a864b9c32fb688d62e64e7eee7fc0672614d06e0d8c004c8fa494113a9c834c1a09df1be91454ee00ee58865fcd31d01d7e0
|
data/.gitignore
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# rcov generated
|
|
2
|
+
coverage
|
|
3
|
+
|
|
4
|
+
# rdoc generated
|
|
5
|
+
rdoc
|
|
6
|
+
|
|
7
|
+
# yard generated
|
|
8
|
+
doc
|
|
9
|
+
.yardoc
|
|
10
|
+
|
|
11
|
+
# bundler
|
|
12
|
+
.bundle
|
|
13
|
+
|
|
14
|
+
# jeweler generated
|
|
15
|
+
pkg
|
|
16
|
+
|
|
17
|
+
# for RVM
|
|
18
|
+
.rvmrc
|
|
19
|
+
|
|
20
|
+
# for RubyMine
|
|
21
|
+
.idea
|
|
22
|
+
|
|
23
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
|
24
|
+
#
|
|
25
|
+
# * Create a file at ~/.gitignore
|
|
26
|
+
# * Include files you want ignored
|
|
27
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
|
28
|
+
#
|
|
29
|
+
# After doing this, these files will be ignored in all your git projects,
|
|
30
|
+
# saving you from having to 'pollute' every project you touch with them
|
|
31
|
+
#
|
|
32
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
|
33
|
+
#
|
|
34
|
+
# For MacOS:
|
|
35
|
+
#
|
|
36
|
+
#.DS_Store
|
|
37
|
+
#
|
|
38
|
+
# For TextMate
|
|
39
|
+
#*.tmproj
|
|
40
|
+
tmtags
|
|
41
|
+
#
|
|
42
|
+
# For emacs:
|
|
43
|
+
#*~
|
|
44
|
+
#\#*
|
|
45
|
+
#.\#*
|
|
46
|
+
#
|
|
47
|
+
# For vim:
|
|
48
|
+
#*.swp
|
|
49
|
+
#
|
|
50
|
+
spec/rails_app/log/*
|
|
51
|
+
*.log
|
|
52
|
+
*.sqlite3
|
|
53
|
+
Gemfile*.lock
|
|
54
|
+
gemfiles/*.lock
|
|
55
|
+
.ruby-version
|
|
56
|
+
tags
|
data/.travis.yml
CHANGED
|
@@ -1,3 +1,132 @@
|
|
|
1
1
|
language: ruby
|
|
2
2
|
rvm:
|
|
3
|
-
- 1.9.
|
|
3
|
+
- 1.9.3
|
|
4
|
+
- 2.0.0
|
|
5
|
+
- 2.1
|
|
6
|
+
|
|
7
|
+
services: mongodb
|
|
8
|
+
|
|
9
|
+
gemfile:
|
|
10
|
+
- Gemfile
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
- "SORCERY_ORM=active_record"
|
|
14
|
+
- "SORCERY_ORM=mongoid"
|
|
15
|
+
- "SORCERY_ORM=mongo_mapper"
|
|
16
|
+
- "SORCERY_ORM=data_mapper"
|
|
17
|
+
|
|
18
|
+
before_script:
|
|
19
|
+
- mysql -e 'create database sorcery_test;'
|
|
20
|
+
|
|
21
|
+
matrix:
|
|
22
|
+
allow_failures:
|
|
23
|
+
- rvm: :jruby
|
|
24
|
+
|
|
25
|
+
include:
|
|
26
|
+
- rvm: 1.9.3
|
|
27
|
+
gemfile: gemfiles/mongoid-rails41.gemfile
|
|
28
|
+
env: "SORCERY_ORM=mongoid"
|
|
29
|
+
|
|
30
|
+
- rvm: 2.0.0
|
|
31
|
+
gemfile: gemfiles/mongoid-rails41.gemfile
|
|
32
|
+
env: "SORCERY_ORM=mongoid"
|
|
33
|
+
|
|
34
|
+
- rvm: 2.1
|
|
35
|
+
gemfile: gemfiles/mongoid-rails41.gemfile
|
|
36
|
+
env: "SORCERY_ORM=mongoid"
|
|
37
|
+
|
|
38
|
+
- rvm: jruby
|
|
39
|
+
gemfile: gemfiles/mongoid-rails41.gemfile
|
|
40
|
+
env: "SORCERY_ORM=mongoid"
|
|
41
|
+
|
|
42
|
+
- rvm: 1.9.3
|
|
43
|
+
gemfile: gemfiles/mongo_mapper-rails41.gemfile
|
|
44
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
45
|
+
|
|
46
|
+
- rvm: 2.0.0
|
|
47
|
+
gemfile: gemfiles/mongo_mapper-rails41.gemfile
|
|
48
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
49
|
+
|
|
50
|
+
- rvm: 2.1
|
|
51
|
+
gemfile: gemfiles/mongo_mapper-rails41.gemfile
|
|
52
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
53
|
+
|
|
54
|
+
- rvm: jruby
|
|
55
|
+
gemfile: gemfiles/mongo_mapper-rails41.gemfile
|
|
56
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
57
|
+
|
|
58
|
+
- rvm: 1.9.3
|
|
59
|
+
gemfile: gemfiles/active_record-rails41.gemfile
|
|
60
|
+
env: "SORCERY_ORM=active_record"
|
|
61
|
+
|
|
62
|
+
- rvm: 2.0.0
|
|
63
|
+
gemfile: gemfiles/active_record-rails41.gemfile
|
|
64
|
+
env: "SORCERY_ORM=active_record"
|
|
65
|
+
|
|
66
|
+
- rvm: 2.1
|
|
67
|
+
gemfile: gemfiles/active_record-rails41.gemfile
|
|
68
|
+
env: "SORCERY_ORM=active_record"
|
|
69
|
+
|
|
70
|
+
- rvm: jruby
|
|
71
|
+
gemfile: gemfiles/active_record-rails41.gemfile
|
|
72
|
+
env: "SORCERY_ORM=active_record"
|
|
73
|
+
|
|
74
|
+
- rvm: 1.9.3
|
|
75
|
+
gemfile: gemfiles/mongoid-rails40.gemfile
|
|
76
|
+
env: "SORCERY_ORM=mongoid"
|
|
77
|
+
|
|
78
|
+
- rvm: 2.0.0
|
|
79
|
+
gemfile: gemfiles/mongoid-rails40.gemfile
|
|
80
|
+
env: "SORCERY_ORM=mongoid"
|
|
81
|
+
|
|
82
|
+
- rvm: 2.1
|
|
83
|
+
gemfile: gemfiles/mongoid-rails40.gemfile
|
|
84
|
+
env: "SORCERY_ORM=mongoid"
|
|
85
|
+
|
|
86
|
+
- rvm: jruby
|
|
87
|
+
gemfile: gemfiles/mongoid-rails40.gemfile
|
|
88
|
+
env: "SORCERY_ORM=mongoid"
|
|
89
|
+
|
|
90
|
+
- rvm: 1.9.3
|
|
91
|
+
gemfile: gemfiles/mongo_mapper-rails40.gemfile
|
|
92
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
93
|
+
|
|
94
|
+
- rvm: 2.0.0
|
|
95
|
+
gemfile: gemfiles/mongo_mapper-rails40.gemfile
|
|
96
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
97
|
+
|
|
98
|
+
- rvm: 2.1
|
|
99
|
+
gemfile: gemfiles/mongo_mapper-rails40.gemfile
|
|
100
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
101
|
+
|
|
102
|
+
- rvm: jruby
|
|
103
|
+
gemfile: gemfiles/mongo_mapper-rails40.gemfile
|
|
104
|
+
env: "SORCERY_ORM=mongo_mapper"
|
|
105
|
+
|
|
106
|
+
- rvm: 1.9.3
|
|
107
|
+
gemfile: gemfiles/active_record-rails40.gemfile
|
|
108
|
+
env: "SORCERY_ORM=active_record"
|
|
109
|
+
|
|
110
|
+
- rvm: 2.0.0
|
|
111
|
+
gemfile: gemfiles/active_record-rails40.gemfile
|
|
112
|
+
env: "SORCERY_ORM=active_record"
|
|
113
|
+
|
|
114
|
+
- rvm: 2.1
|
|
115
|
+
gemfile: gemfiles/active_record-rails40.gemfile
|
|
116
|
+
env: "SORCERY_ORM=active_record"
|
|
117
|
+
|
|
118
|
+
- rvm: jruby
|
|
119
|
+
gemfile: gemfiles/active_record-rails40.gemfile
|
|
120
|
+
env: "SORCERY_ORM=active_record"
|
|
121
|
+
|
|
122
|
+
- rvm: 1.9.3
|
|
123
|
+
gemfile: gemfiles/mongoid3-rails32.gemfile
|
|
124
|
+
env: "SORCERY_ORM=mongoid"
|
|
125
|
+
|
|
126
|
+
- rvm: 2.0.0
|
|
127
|
+
gemfile: gemfiles/mongoid3-rails32.gemfile
|
|
128
|
+
env: "SORCERY_ORM=mongoid"
|
|
129
|
+
|
|
130
|
+
- rvm: 2.1
|
|
131
|
+
gemfile: gemfiles/mongoid3-rails32.gemfile
|
|
132
|
+
env: "SORCERY_ORM=mongoid"
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0 (not released yet)
|
|
4
|
+
|
|
5
|
+
* Adapters (Mongoid, MongoMapper, DataMapper) are now separated from the core Sorcery repo and moved under `sorcery-rails` organization. Special thanks to @juike!
|
|
6
|
+
|
|
7
|
+
## 0.9.0
|
|
8
|
+
|
|
9
|
+
* Sending emails works with Rails 4.2 (thanks to @wooly)
|
|
10
|
+
* Added `valid_password?` method
|
|
11
|
+
* Added support for JIRA OAuth (thanks to @camilasan)
|
|
12
|
+
* Added support for Heroku OAuth (thanks to @tyrauber)
|
|
13
|
+
* Added support for Salesforce OAuth (thanks to @supremebeing7)
|
|
14
|
+
* Added support for Mongoid 4
|
|
15
|
+
* Fixed issues with empty passwords (thanks to @Borzik)
|
|
16
|
+
* `find_by_provider_and_uid` method was replaced with `find_by_oauth_credentials`
|
|
17
|
+
* Sorcery::VERSION constant was added to allow easy version check
|
|
18
|
+
* `@user.setup_activation` method was made to be public (thanks @iTakeshi)
|
|
19
|
+
* `current_users` method is deprecated
|
|
20
|
+
* Fetching email from VK auth, thanks to @makaroni4
|
|
21
|
+
* Add logged_in? method to test_helpers (thanks to @oriolbcn)
|
|
22
|
+
* #locked? method is now public API (thanks @rogercampos)
|
|
23
|
+
* Introduces a new User instance method `generate_reset_password_token` to generate a new reset password token without sending an email (thanks to @tbuehl)
|
|
24
|
+
|
|
25
|
+
## 0.8.6
|
|
26
|
+
|
|
27
|
+
* `current_user` returns `nil` instead of `false` if there's no user loggd in (#493)
|
|
28
|
+
* MongoMapper adapter does not override `save!` method anymore. However due to ORM's lack of support for `validate: false` in `save!`, the combination of `validate: false` and `raise_on_failure: true` is not possible in MongoMapper. The errors will not be raised in this situation. (#151)
|
|
29
|
+
* Fixed rename warnings for bcrypt-ruby
|
|
30
|
+
* The way Sorcery adapters are included has been changed due to problem with multiple `included` blocks error in `ActiveSupport::Concern` class (#527)
|
|
31
|
+
* Session timeout works with new cookie serializer introduced in Rails 4.1
|
|
32
|
+
* Rails 4.1 compatibility bugs were fixed, this version is fully supported (#538)
|
|
33
|
+
* VK providers now supports `scope` option
|
|
34
|
+
* Support for DataMapper added
|
|
35
|
+
* Helpers for integration tests were added
|
|
36
|
+
* Fixed problems with special characters in user login attributes (MongoMapper & Mongoid)
|
|
37
|
+
* Fixed remaining `password_confirmation` value - it is now cleared just like `password`
|
|
38
|
+
|
|
39
|
+
## 0.8.5
|
|
40
|
+
* Fixed add_provider_to_user with CamelCased authentications_class model (#382)
|
|
41
|
+
* Fixed unlock_token_mailer_disabled to only disable automatic mailing (#467)
|
|
42
|
+
* Make send_email_* methods easier to overwrite (#473)
|
|
43
|
+
* Don't add `:username` field for User. Config option `username_attribute_names` is now `:email` by default instead of `:username`.
|
|
44
|
+
|
|
45
|
+
If you're using `username` as main field for users to login, you'll need to tune your Sorcery config:
|
|
46
|
+
|
|
47
|
+
```ruby
|
|
48
|
+
config.user_config do |user|
|
|
49
|
+
# ...
|
|
50
|
+
user.username_attribute_names = [:username]
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
* `rails generate sorcery:install` now works inside Rails engine
|
|
54
|
+
|
|
55
|
+
## 0.8.4
|
|
56
|
+
|
|
57
|
+
* Few security fixes in `external` module
|
|
58
|
+
|
|
59
|
+
## 0.8.3 (yanked because of bad Jeweler release)
|
|
60
|
+
|
|
61
|
+
## 0.8.2
|
|
62
|
+
|
|
63
|
+
* Activity logging feature has a new column called `last_login_from_ip_address` (string type). If you use ActiveRecord, you will have to add this column to DB ([#465](https://github.com/NoamB/sorcery/issues/465))
|
|
64
|
+
|
|
65
|
+
## 0.8.1
|
|
66
|
+
<!-- TO BE WRITTEN -->
|
|
67
|
+
|
|
68
|
+
## 0.8.0
|
|
69
|
+
<!-- TO BE WRITTEN -->
|
|
70
|
+
|
|
71
|
+
## 0.7.13
|
|
72
|
+
<!-- TO BE WRITTEN -->
|
|
73
|
+
|
|
74
|
+
## 0.7.12
|
|
75
|
+
<!-- TO BE WRITTEN -->
|
|
76
|
+
|
|
77
|
+
## 0.7.11
|
|
78
|
+
<!-- TO BE WRITTEN -->
|
|
79
|
+
|
|
80
|
+
## 0.7.10
|
|
81
|
+
<!-- TO BE WRITTEN -->
|
|
82
|
+
|
|
83
|
+
## 0.7.9
|
|
84
|
+
<!-- TO BE WRITTEN -->
|
|
85
|
+
|
|
86
|
+
## 0.7.8
|
|
87
|
+
<!-- TO BE WRITTEN -->
|
|
88
|
+
|
|
89
|
+
## 0.7.7
|
|
90
|
+
<!-- TO BE WRITTEN -->
|
|
91
|
+
|
|
92
|
+
## 0.7.6
|
|
93
|
+
<!-- TO BE WRITTEN -->
|
|
94
|
+
|
|
95
|
+
## 0.7.5
|
|
96
|
+
<!-- TO BE WRITTEN -->
|
|
97
|
+
|
|
98
|
+
## 0.7.1-0.7.4
|
|
99
|
+
|
|
100
|
+
* Fixed a bug in the new generator
|
|
101
|
+
* Many bugfixes
|
|
102
|
+
* MongoMapper added to supported ORMs list, thanks @kbighorse
|
|
103
|
+
* Sinatra support discontinued!
|
|
104
|
+
* New generator contributed by @ahazem
|
|
105
|
+
* Cookie domain setting contributed by @Highcode
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## 0.7.0
|
|
109
|
+
|
|
110
|
+
* Many bugfixes
|
|
111
|
+
* Added default SSL certificate for oauth2
|
|
112
|
+
* Added multi-username ability
|
|
113
|
+
* Security fixes (CSRF, cookie digesting)
|
|
114
|
+
* Added auto_login(user) to the API
|
|
115
|
+
* Updated gem versions of oauth(1/2)
|
|
116
|
+
* Added logged_in? as a view helper
|
|
117
|
+
* Github provider added to external submodule
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## 0.6.1
|
|
121
|
+
|
|
122
|
+
Gemfile versions updated due to public demand.
|
|
123
|
+
(bcrypt 3.0.0 and oauth2 0.4.1)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 0.6.0
|
|
127
|
+
|
|
128
|
+
Fixes issues with external user_hash not including some fields, and an issue with User model not loaded when user_class is called. Now config.user_class should be a string or a symbol.
|
|
129
|
+
|
|
130
|
+
Improved specs.
|
|
131
|
+
|
|
132
|
+
## 0.5.3
|
|
133
|
+
|
|
134
|
+
Fixed #9
|
|
135
|
+
Fixed hardcoded method names in remember_me submodule.
|
|
136
|
+
Improved specs.
|
|
137
|
+
|
|
138
|
+
## 0.5.21
|
|
139
|
+
|
|
140
|
+
Fixed typo in initializer - MUST be "config.user_class = User"
|
|
141
|
+
|
|
142
|
+
## 0.5.2
|
|
143
|
+
|
|
144
|
+
Fixed #3 and #4 - Modular Sinatra apps work now, and User model isn't cached in development mode.
|
|
145
|
+
|
|
146
|
+
## 0.5.1
|
|
147
|
+
|
|
148
|
+
Fixed bug in reset_password - after reset can't login due to bad salt creation. Affected only Mongoid.
|
|
149
|
+
|
|
150
|
+
## 0.5.0
|
|
151
|
+
|
|
152
|
+
Added support for Mongoid! (still buggy and not recommended for serious use)
|
|
153
|
+
|
|
154
|
+
'reset_password!(:password => new_password)' changed into 'change_password!(new_password)'
|
|
155
|
+
|
|
156
|
+
## 0.4.2
|
|
157
|
+
|
|
158
|
+
Added test helpers for Rails 3 & Sinatra.
|
|
159
|
+
|
|
160
|
+
## 0.4.1
|
|
161
|
+
|
|
162
|
+
Fixing Rails app name in initializer.
|
|
163
|
+
|
|
164
|
+
## 0.4.0
|
|
165
|
+
|
|
166
|
+
Changed the way Sorcery is configured.
|
|
167
|
+
Now inside the model only add:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
authenticates_with_sorcery!
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
In the controller no code is needed! All configuration is done in an initializer.
|
|
174
|
+
Added a rake task to create it.
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
rake sorcery:bootstrap
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## 0.3.1
|
|
181
|
+
|
|
182
|
+
Renamed "oauth" module to "external" and made API prettier.
|
|
183
|
+
```
|
|
184
|
+
auth_at_provider(provider) => login_at(provider)
|
|
185
|
+
login_from_access_token(provider) => login_from(provider)
|
|
186
|
+
create_from_provider!(provider) => create_from(provider)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## 0.3.0
|
|
190
|
+
|
|
191
|
+
Added Sinatra support!
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
Added Rails 3 generator for migrations
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
## 0.2.1
|
|
198
|
+
|
|
199
|
+
Fixed bug with OAuth submodule - oauth gems were not required properly in gem.
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
Fixed bug with OAuth submodule - Authentications class was not passed between model and controller in all cases resulting in Nil exception.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## 0.2.0
|
|
206
|
+
|
|
207
|
+
Added OAuth submodule.
|
|
208
|
+
|
|
209
|
+
### OAuth:
|
|
210
|
+
* OAuth1 and OAuth2 support (currently twitter & facebook)
|
|
211
|
+
* configurable db field names and authentications table.
|
|
212
|
+
|
|
213
|
+
Some bug fixes: 'return_to' feature, brute force permanent ban.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## 0.1.4
|
|
217
|
+
|
|
218
|
+
Added activity logging submodule.
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### Activity Logging:
|
|
222
|
+
* automatic logging of last login, last logout and last activity time.
|
|
223
|
+
* an easy method of collecting the list of currently logged in users.
|
|
224
|
+
* configurable timeout by which to decide whether to include a user in the list of logged in users.
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
Fixed bug in basic_auth - it didn't set the session[:user_id] on successful login and tried to relogin from basic_auth on every action.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
Added Reset Password hammering protection and updated the API.
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
Totally rewritten Brute Force Protection submodule.
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## 0.1.3
|
|
237
|
+
|
|
238
|
+
Added support for Basic HTTP Auth.
|
|
239
|
+
|
|
240
|
+
## 0.1.2
|
|
241
|
+
|
|
242
|
+
Separated mailers between user_activation and password_reset and updated readme.
|
|
243
|
+
|
|
244
|
+
## 0.1.1
|
|
245
|
+
|
|
246
|
+
Fixed bug with BCrypt not being used properly by the lib and thus not working for authentication.
|
|
247
|
+
|
|
248
|
+
## 0.1.0
|
|
249
|
+
|
|
250
|
+
### Core Features:
|
|
251
|
+
* login/logout, optional redirect on login to where the user tried to reach before, configurable redirect for non-logged-in users.
|
|
252
|
+
* password encryption, algorithms: bcrypt(default), md5, sha1, sha256, sha512, aes256, custom(yours!), none. Configurable stretches and salt.
|
|
253
|
+
* configurable attribute names for username, password and email.
|
|
254
|
+
### User Activation:
|
|
255
|
+
* User activation by email with optional success email.
|
|
256
|
+
* configurable attribute names.
|
|
257
|
+
* configurable mailer.
|
|
258
|
+
* Optionally prevent active users to login.
|
|
259
|
+
### Password Reset:
|
|
260
|
+
* Reset password with email verification.
|
|
261
|
+
* configurable mailer, method name, and attribute name.
|
|
262
|
+
### Remember Me:
|
|
263
|
+
* Remember me with configurable expiration.
|
|
264
|
+
* configurable attribute names.
|
|
265
|
+
## Session Timeout:
|
|
266
|
+
* Configurable session timeout.
|
|
267
|
+
* Optionally session timeout will be calculated from last user action.
|
|
268
|
+
### Brute Force Protection:
|
|
269
|
+
* Brute force login hammering protection.
|
|
270
|
+
* configurable logins before ban, logins within time period before ban, ban time and ban action.
|
data/Gemfile
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
|
-
# Add dependencies required to use your gem here.
|
|
3
|
-
# Example:
|
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
|
5
|
-
gem 'oauth', "~> 0.4.4"
|
|
6
|
-
gem 'oauth2', "~> 0.8.0"
|
|
7
|
-
gem 'bcrypt-ruby', "~> 3.0.0"
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
gem 'json', ">= 1.7.7"
|
|
15
|
-
gem "rspec", "~> 2.5.0"
|
|
16
|
-
gem 'rspec-rails', "~> 2.5.0"
|
|
17
|
-
#gem 'ruby-debug19'
|
|
18
|
-
gem 'sqlite3'
|
|
19
|
-
gem "yard", "~> 0.6.0"
|
|
20
|
-
gem "bundler", ">= 1.1.0"
|
|
21
|
-
gem "jeweler", "~> 1.8.3"
|
|
22
|
-
gem 'simplecov', '>= 0.3.8', :require => false # Will install simplecov-html as a dependency
|
|
23
|
-
gem 'timecop'
|
|
24
|
-
gem 'capybara'
|
|
3
|
+
gem 'rails', '~> 3.2'
|
|
4
|
+
gem 'sqlite3'
|
|
5
|
+
gem 'pry'
|
|
6
|
+
|
|
7
|
+
group :mongomapper do
|
|
25
8
|
gem 'mongo_mapper'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
group :mongoid do
|
|
26
12
|
gem 'mongoid', "~> 2.4.4"
|
|
13
|
+
gem 'bson_ext'
|
|
27
14
|
end
|
|
15
|
+
|
|
16
|
+
group :datamapper do
|
|
17
|
+
gem 'mysql2'
|
|
18
|
+
gem 'data_mapper'
|
|
19
|
+
gem 'dm-mysql-adapter'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
gemspec
|