Class: OmniAuth::Strategies::Ub
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Ub
- Defined in:
- lib/omniauth/strategies/ub.rb
Constant Summary collapse
- REGEXP_SANITIZER =
/[<>?%&^*#@()\[\]=+:;"{}\\|]/
Instance Method Summary collapse
Instance Method Details
#callback_url ⇒ Object
26 27 28 |
# File 'lib/omniauth/strategies/ub.rb', line 26 def callback_url full_host + callback_path end |
#raw_info ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/omniauth/strategies/ub.rb', line 30 def raw_info @raw_info ||= begin connection = Faraday.new(url: .[:site], ssl: { verify: true }) do |conn| conn.headers["Authorization"] = "#{access_token.response.parsed.token_type} #{access_token.token}" end response = connection.get("/api/adas/oauth2/tokendata") raise Error, "Unable to fetch the user information" unless response.success? JSON.parse(response.body).to_h end end |