Class: OmniAuth::Strategies::Pinterest
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Pinterest
- Defined in:
- lib/omniauth/strategies/pinterest.rb
Instance Method Summary collapse
-
#authorize_params ⇒ Object
You can also set these options in the OmniAuth config :authorize_params option.
- #callback_url ⇒ Object
- #raw_info ⇒ Object
- #request_phase ⇒ Object
- #ssl? ⇒ Boolean
Instance Method Details
#authorize_params ⇒ Object
You can also set these options in the OmniAuth config :authorize_params option.
For example: /auth/facebook?display=popup
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/omniauth/strategies/pinterest.rb', line 35 def super.tap do |params| %w[display scope auth_type].each do |v| if request.params[v] params[v.to_sym] = request.params[v] end end params[:scope] ||= DEFAULT_SCOPE end end |
#callback_url ⇒ Object
47 48 49 |
# File 'lib/omniauth/strategies/pinterest.rb', line 47 def callback_url full_host + script_name + callback_path end |
#raw_info ⇒ Object
22 23 24 25 |
# File 'lib/omniauth/strategies/pinterest.rb', line 22 def raw_info fields = 'first_name,id,last_name,url,account_type,username,bio,image' @raw_info ||= access_token.get("/v1/me/?fields=#{fields}").parsed['data'] end |
#request_phase ⇒ Object
12 13 14 15 16 |
# File 'lib/omniauth/strategies/pinterest.rb', line 12 def request_phase [:scope] ||= 'read_public' [:response_type] ||= 'code' super end |
#ssl? ⇒ Boolean
27 28 29 |
# File 'lib/omniauth/strategies/pinterest.rb', line 27 def ssl? true end |