Class: OmniAuth::Strategies::Fiken
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Fiken
- Defined in:
- lib/omniauth-fiken.rb
Instance Method Summary collapse
- #basic_auth_header ⇒ Object
-
#build_access_token ⇒ Object
The Fiken API requires HTTP Basic Authentication when exchanging the code for a token (i.e. when POSTing to /v1/oauth/token).
- #callback_url ⇒ Object
Instance Method Details
#basic_auth_header ⇒ Object
34 35 36 |
# File 'lib/omniauth-fiken.rb', line 34 def basic_auth_header "Basic " + Base64.strict_encode64("#{[:client_id]}:#{[:client_secret]}") end |
#build_access_token ⇒ Object
The Fiken API requires HTTP Basic Authentication when exchanging the code for a token (i.e. when POSTing to /v1/oauth/token)
27 28 29 30 31 32 |
# File 'lib/omniauth-fiken.rb', line 27 def build_access_token .token_params.merge!( headers: { 'Authorization' => basic_auth_header }, ) super end |
#callback_url ⇒ Object
38 39 40 |
# File 'lib/omniauth-fiken.rb', line 38 def callback_url full_host + script_name + callback_path end |