Class: Auth::TwitterAuthenticator
Instance Method Summary
collapse
#after_create_account, #always_update_user_email?, #can_connect_existing_user?, #can_revoke?, #description_for_auth_hash, #description_for_user, #find_user_by_email, #find_user_by_username, #is_managed?, #match_by_email, #match_by_username, #retrieve_avatar, #retrieve_profile, #revoke
#after_create_account, #can_connect_existing_user?, #can_revoke?, #description_for_auth_hash, #description_for_user, #provides_groups?, #revoke
Instance Method Details
#after_authenticate(auth_token, existing_account: nil) ⇒ Object
12
13
14
15
16
|
# File 'lib/auth/twitter_authenticator.rb', line 12
def after_authenticate(auth_token, existing_account: nil)
auth_token[:extra] = {}
super
end
|
#enabled? ⇒ Boolean
8
9
10
|
# File 'lib/auth/twitter_authenticator.rb', line 8
def enabled?
SiteSetting.
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/auth/twitter_authenticator.rb', line 4
def name
"twitter"
end
|
#primary_email_verified?(auth_token) ⇒ Boolean
30
31
32
|
# File 'lib/auth/twitter_authenticator.rb', line 30
def primary_email_verified?(auth_token)
true
end
|
#register_middleware(omniauth) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/auth/twitter_authenticator.rb', line 18
def register_middleware(omniauth)
omniauth.provider :twitter,
setup:
lambda { |env|
strategy = env["omniauth.strategy"]
strategy.options[:consumer_key] = SiteSetting.
strategy.options[:consumer_secret] = SiteSetting.
}
end
|