Class: OmniAuth::Strategies::OsmOauth2
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::OsmOauth2
- Defined in:
- lib/omniauth/strategies/osm_oauth2.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.site ⇒ Object
11 12 13 |
# File 'lib/omniauth/strategies/osm_oauth2.rb', line 11 def self.site ENV['OSM_AUTH_SITE'] || 'https://www.openstreetmap.org' end |
Instance Method Details
#authorize_params ⇒ Object
27 28 29 30 31 |
# File 'lib/omniauth/strategies/osm_oauth2.rb', line 27 def super.tap do |params| params[:scope] = [:scope].split(',').join(' ') end end |
#raw_info ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/omniauth/strategies/osm_oauth2.rb', line 46 def raw_info @raw_info ||= parse_details(access_token.get('/api/0.6/user/details').body) @raw_info['permissions'] ||= (access_token.get('/api/0.6/permissions').body) if [:fetch_permissions] @raw_info rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |