Class: OmniAuth::Strategies::Wonde
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Wonde
- Defined in:
- lib/omniauth/strategies/wonde.rb
Overview
Authentication strategy for Wonde
Wonde implements OAuth 2 (three legged)
Constant Summary collapse
- USER_INFO_URL =
"https://api.wonde.com/graphql/me"
Class Method Summary collapse
-
.user_query_body ⇒ String
JSON string.
Instance Method Summary collapse
Class Method Details
.user_query_body ⇒ String
Returns JSON string.
44 45 46 47 48 49 |
# File 'lib/omniauth/strategies/wonde.rb', line 44 def self.user_query_body @user_query_body ||= begin gql = File.read(File.("user_data.graphql", __dir__)) { query: gql }.to_json end end |
Instance Method Details
#callback_url ⇒ String
60 61 62 63 64 65 66 67 68 |
# File 'lib/omniauth/strategies/wonde.rb', line 60 def callback_url [:redirect_uri] || ( full_host + script_name + callback_path ) # "#{full_host}#{script_name}#{callback_path}" end |
#raw_info ⇒ Hash
52 53 54 55 56 57 |
# File 'lib/omniauth/strategies/wonde.rb', line 52 def raw_info @raw_info ||= begin data = fetch_user_info.parsed || {} data["data"] || {} end end |