Class: OmniAuth::Strategies::Nextcloud
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Nextcloud
- Defined in:
- lib/omniauth/strategies/nextcloud.rb
Instance Method Summary collapse
Instance Method Details
#client ⇒ Object
27 28 29 |
# File 'lib/omniauth/strategies/nextcloud.rb', line 27 def client ::OAuth2::Client.new(.client_id, .client_secret, deep_symbolize()) end |
#merged_client_options ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/omniauth/strategies/nextcloud.rb', line 18 def overrides = . { site: overrides.site || "#{.site_url}/index.php/apps/oauth2", authorize_url: overrides. || "#{.site_url}/index.php/apps/oauth2/authorize", token_url: overrides.token_url || "#{.site_url}/index.php/apps/oauth2/api/v1/token" } end |
#raw_info ⇒ Object
55 56 57 |
# File 'lib/omniauth/strategies/nextcloud.rb', line 55 def raw_info @raw_info ||= Hash.from_xml(access_token.get("#{.site_url}/ocs/v2.php/cloud/user").body) end |