Class: OmniAuth::Strategies::Segment
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Segment
- Defined in:
- lib/omniauth/strategies/omniauth-segment.rb
Overview
Segment Omniauth Strategy
Instance Method Summary collapse
Instance Method Details
#basic_auth_header ⇒ Object
27 28 29 |
# File 'lib/omniauth/strategies/omniauth-segment.rb', line 27 def basic_auth_header "Basic " + Base64.strict_encode64("#{[:client_id]}:#{[:client_secret]}") end |
#build_access_token ⇒ Object
22 23 24 25 |
# File 'lib/omniauth/strategies/omniauth-segment.rb', line 22 def build_access_token .token_params.merge!(:headers => {'Authorization' => basic_auth_header }) super end |
#callback_url ⇒ Object
31 32 33 34 |
# File 'lib/omniauth/strategies/omniauth-segment.rb', line 31 def callback_url return [:redirect_uri] unless [:redirect_uri].nil? full_host + script_name + callback_path end |
#scope ⇒ Object
18 19 20 |
# File 'lib/omniauth/strategies/omniauth-segment.rb', line 18 def scope [:scope] end |