Class: OmniAuth::Strategies::Cobot
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Cobot
- Defined in:
- lib/omniauth/strategies/cobot.rb
Instance Method Summary collapse
Instance Method Details
#client ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/omniauth/strategies/cobot.rb', line 14 def client ::OAuth2::Client.new( .client_id, .client_secret, deep_symbolize( ..merge( authorize_url: ) ) ) end |
#raw_info ⇒ Object
48 49 50 51 |
# File 'lib/omniauth/strategies/cobot.rb', line 48 def raw_info access_token.[:mode] = :query @raw_info ||= access_token.get('/api/user').parsed end |
#space_subdomain_authorize_url ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/omniauth/strategies/cobot.rb', line 26 def params = Rack::Utils.parse_nested_query(env['QUERY_STRING']) if (subdomain = params['cobot_space_subdomain']) .[:authorize_url].sub('www.', "#{subdomain}.") else .[:authorize_url] end end |