Class: OmniAuth::Strategies::Vonage
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Vonage
- Defined in:
- lib/omniauth/strategies/vonage.rb
Instance Method Summary collapse
- #callback_url ⇒ Object
- #client_get_token(verifier, redirect_uri) ⇒ Object
- #get_access_token(request) ⇒ Object
- #get_token_options(redirect_uri = '') ⇒ Object
- #get_token_params ⇒ Object
- #raw_info ⇒ Object
Instance Method Details
#callback_url ⇒ Object
41 42 43 |
# File 'lib/omniauth/strategies/vonage.rb', line 41 def callback_url [:redirect_uri] || (full_host + script_name + callback_path) end |
#client_get_token(verifier, redirect_uri) ⇒ Object
50 51 52 |
# File 'lib/omniauth/strategies/vonage.rb', line 50 def client_get_token(verifier, redirect_uri) client.auth_code.get_token(verifier, (redirect_uri), get_token_params) end |
#get_access_token(request) ⇒ Object
45 46 47 48 |
# File 'lib/omniauth/strategies/vonage.rb', line 45 def get_access_token(request) verifier = request.params['code'] client_get_token(verifier, callback_url) end |
#get_token_options(redirect_uri = '') ⇒ Object
58 59 60 |
# File 'lib/omniauth/strategies/vonage.rb', line 58 def (redirect_uri = '') { redirect_uri: redirect_uri }.merge(token_params.to_hash(symbolize_keys: true)) end |
#get_token_params ⇒ Object
54 55 56 |
# File 'lib/omniauth/strategies/vonage.rb', line 54 def get_token_params deep_symbolize(.auth_token_params || {}) end |
#raw_info ⇒ Object
37 38 39 |
# File 'lib/omniauth/strategies/vonage.rb', line 37 def raw_info @raw_info ||= access_token.get('/oauth2/userinfo').parsed end |