Class: OmniAuth::Strategies::PassaporteWeb
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::PassaporteWeb
- Defined in:
- lib/omni_auth_passaporte_web/passaporte_web.rb
Overview
Authenticate to PassaporteWeb via OAuth and retrieve an access token for API usage
Usage:
use OmniAuth::Strategies::PassaporteWeb, 'consumerkey', 'consumersecret', :client_options => {:site => 'http://sandbox.app.passaporteweb.com.br'}
Instance Method Summary collapse
Instance Method Details
#fetch_user_data_post_body ⇒ Object
57 58 59 |
# File 'lib/omni_auth_passaporte_web/passaporte_web.rb', line 57 def fetch_user_data_post_body ['client_options']['include_expired_service_accounts'] ? {:include_expired_accounts => true} : nil end |
#user_data ⇒ Object
52 53 54 55 |
# File 'lib/omni_auth_passaporte_web/passaporte_web.rb', line 52 def user_data @result ||= access_token.post('/sso/fetchuserdata', fetch_user_data_post_body) @user_data ||= MultiJson.decode(@result.body) end |