omniauth-multiprovider 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +13 -18
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +52 -7
- data/Rakefile +2 -0
- data/lib/omniauth-multiprovider.rb +3 -1
- data/lib/omniauth/multiprovider.rb +0 -1
- data/lib/omniauth/multiprovider/config.rb +25 -0
- data/lib/omniauth/multiprovider/controllers/callbacks_controller.rb +43 -3
- data/lib/omniauth/multiprovider/error.rb +24 -1
- data/lib/omniauth/multiprovider/models/active_record.rb +14 -0
- data/lib/omniauth/multiprovider/models/authentication.rb +1 -9
- data/lib/omniauth/multiprovider/models/concerns/omni_authenticable.rb +79 -32
- data/lib/omniauth/multiprovider/version.rb +1 -1
- data/lib/omniauth/provider/abstract.rb +6 -38
- data/lib/omniauth/provider/generic.rb +10 -13
- data/omniauth-multiprovider.gemspec +15 -2
- data/spec/omniauth/error_spec.rb +30 -0
- data/spec/omniauth/multiprovider/controllers/callbacks_controller_spec.rb +90 -0
- data/spec/omniauth/multiprovider/models/active_record_spec.rb +21 -0
- data/spec/omniauth/multiprovider/models/concerns/omni_authenticable_spec.rb +67 -0
- data/spec/omniauth/provider/abstract_spec.rb +15 -0
- data/spec/omniauth/provider/facebook_spec.rb +13 -0
- data/spec/omniauth/provider/generic_spec.rb +13 -0
- data/spec/rails_app/.gitignore +17 -0
- data/spec/rails_app/Rakefile +6 -0
- data/spec/rails_app/app/assets/images/.keep +0 -0
- data/spec/rails_app/app/assets/javascripts/application.js +16 -0
- data/spec/rails_app/app/assets/stylesheets/application.css +15 -0
- data/spec/rails_app/app/controllers/application_controller.rb +5 -0
- data/spec/rails_app/app/controllers/concerns/.keep +0 -0
- data/spec/rails_app/app/helpers/application_helper.rb +2 -0
- data/spec/rails_app/app/mailers/.keep +0 -0
- data/spec/rails_app/app/models/.keep +0 -0
- data/spec/rails_app/app/models/concerns/.keep +0 -0
- data/spec/rails_app/app/models/user.rb +4 -0
- data/spec/rails_app/app/views/layouts/application.html.erb +14 -0
- data/spec/rails_app/bin/bundle +3 -0
- data/spec/rails_app/bin/rails +4 -0
- data/spec/rails_app/bin/rake +4 -0
- data/spec/rails_app/bin/setup +29 -0
- data/spec/rails_app/config.ru +4 -0
- data/spec/rails_app/config/application.rb +26 -0
- data/spec/rails_app/config/boot.rb +3 -0
- data/spec/rails_app/config/database.yml +25 -0
- data/spec/rails_app/config/environment.rb +5 -0
- data/spec/rails_app/config/environments/test.rb +42 -0
- data/spec/rails_app/config/initializers/assets.rb +11 -0
- data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/rails_app/config/initializers/devise.rb +259 -0
- data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/rails_app/config/initializers/inflections.rb +16 -0
- data/spec/rails_app/config/initializers/mime_types.rb +4 -0
- data/spec/rails_app/config/initializers/session_store.rb +3 -0
- data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/rails_app/config/locales/en.yml +23 -0
- data/spec/rails_app/config/routes.rb +3 -0
- data/spec/rails_app/config/secrets.yml +22 -0
- data/spec/rails_app/db/seeds.rb +7 -0
- data/spec/rails_app/lib/assets/.keep +0 -0
- data/spec/rails_app/lib/tasks/.keep +0 -0
- data/spec/rails_app/public/404.html +67 -0
- data/spec/rails_app/public/422.html +67 -0
- data/spec/rails_app/public/500.html +66 -0
- data/spec/rails_app/public/favicon.ico +0 -0
- data/spec/rails_app/public/robots.txt +5 -0
- data/spec/spec_helper.rb +43 -0
- data/spec/support/shared_examples_for_providers.rb +27 -0
- metadata +226 -7
- data/lib/omniauth/multiprovider/helpers.rb +0 -23
- data/lib/omniauth/provider/guests.rb +0 -12
@@ -1,23 +0,0 @@
|
|
1
|
-
module OmniAuth
|
2
|
-
module MultiProvider
|
3
|
-
def self.authentication_klass
|
4
|
-
Authentication
|
5
|
-
end
|
6
|
-
|
7
|
-
def self.resource_klass
|
8
|
-
User
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.resource_mapping
|
12
|
-
:user
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.current_resource
|
16
|
-
"current_#{resource_mapping}".to_sym
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.authentication_relationship_name
|
20
|
-
:authentications
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|