Class: OmniAuth::Strategies::Barong
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Barong
- Defined in:
- lib/omniauth/strategies/barong.rb
Instance Method Summary collapse
- #callback_url ⇒ Object
- #client ⇒ Object
- #domain_url ⇒ Object
- #raw_info ⇒ Object
- #raw_info_url ⇒ Object
Instance Method Details
#callback_url ⇒ Object
60 61 62 |
# File 'lib/omniauth/strategies/barong.rb', line 60 def callback_url .callback_url || (full_host + script_name + callback_path) end |
#client ⇒ Object
27 28 29 30 31 32 |
# File 'lib/omniauth/strategies/barong.rb', line 27 def client ..site = domain_url .. = . ..redirect_uri = callback_url super end |
#domain_url ⇒ Object
34 35 36 37 38 |
# File 'lib/omniauth/strategies/barong.rb', line 34 def domain_url domain_url = URI(.domain) domain_url = URI("#{scheme}://#{domain_url}") unless domain_url.class.in? ([URI::HTTP, URI::HTTPS]) domain_url.to_s end |
#raw_info ⇒ Object
52 53 54 |
# File 'lib/omniauth/strategies/barong.rb', line 52 def raw_info @raw_info ||= access_token.get(raw_info_url).parsed end |
#raw_info_url ⇒ Object
56 57 58 |
# File 'lib/omniauth/strategies/barong.rb', line 56 def raw_info_url .raw_info_url || "/api/#{.api_version}/accounts/me" end |