Module: SocialAuth
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/social_auth.rb,
lib/social_auth/engine.rb,
lib/social_auth/railtie.rb,
lib/social_auth/version.rb,
app/models/social_auth/service.rb,
lib/social_auth/acts_as_social_user.rb,
app/models/social_auth/twitter_service.rb,
app/models/social_auth/facebook_service.rb,
app/models/social_auth/google_plus_service.rb
Defined Under Namespace
Modules: ActsAsSocialUser
Classes: BadRequest, Engine, Error, FacebookService, GooglePlusService, InstallGenerator, InvalidToken, Railtie, RateLimitExceeded, Service, ServiceDoesNotExist, TwitterService
Constant Summary
collapse
- VERSION =
"0.0.13"
- @@redis_instance_method =
nil
nil
nil
- @@google_client_id =
nil
- @@google_client_secret =
nil
- @@google_redirect_uri =
nil
- @@google_api_key =
nil
Class Method Summary
collapse
Class Method Details
.authenticate(type, auth_token) ⇒ Object
.connect(user, type, auth_token, method = "Connected") ⇒ Object
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/social_auth.rb', line 46
def self.connect(user, type, auth_token, method="Connected")
case type.camelize
when "Facebook"
FacebookService.connect_with(user, auth_token, method)
when "Twitter"
TwitterService.connect_with(user, auth_token, method)
when "GooglePlus"
GooglePlusService.connect_with(user, auth_token, method)
end
end
|
.disconnect(user, type) ⇒ Object
.setup {|_self| ... } ⇒ Object
Used to set up Social Login from the initializer.
31
32
33
|
# File 'lib/social_auth.rb', line 31
def self.setup
yield self
end
|