Class: OmniAuth::Strategies::BoletoSimples
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::BoletoSimples
- Defined in:
- lib/omniauth/strategies/boletosimples.rb
Constant Summary collapse
- DEFAULT_SCOPE =
"profile"- ENVIRONMENTS =
{ development: 'http://localhost:5000', sandbox: 'https://sandbox.boletosimples.com.br', production: 'https://boletosimples.com.br', }
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
75 76 77 78 79 |
# File 'lib/omniauth/strategies/boletosimples.rb', line 75 def super.tap do |params| params[:scope] ||= DEFAULT_SCOPE end end |
#raw_info ⇒ Object
71 72 73 |
# File 'lib/omniauth/strategies/boletosimples.rb', line 71 def raw_info @raw_info ||= load_identity end |
#setup_phase ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/omniauth/strategies/boletosimples.rb', line 60 def setup_phase environment = .environment || :production .[:site] = ENVIRONMENTS[environment.to_sym] .[:authorize_url] = "#{ENVIRONMENTS[environment.to_sym]}/api/v1/oauth2/authorize" .[:connection_opts] = { headers: { 'User-Agent' => .user_agent, } } if .user_agent end |