Sha256: d587e6c5a9ecfdc608b292ba4ef0f04115bac8389c9ade649285a760f97b1a22
Contents?: true
Size: 727 Bytes
Versions: 2
Compression:
Stored size: 727 Bytes
Contents
require 'omniauth-oauth2' require 'base64' module OmniAuth module Strategies class Skubana < OmniAuth::Strategies::OAuth2 option :client_options, { :authorize_url => '/oauth/authorize', :token_url => '/oauth/token', :site => 'https://app.skubana.com' } option :callback_url option :provider_ignores_state, true protected def build_access_token options.token_params.merge!(:headers => {'Authorization' => basic_auth_header }) super end private def basic_auth_header "Basic " + Base64.strict_encode64("#{options[:client_id]}:#{options[:client_secret]}") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
omniauth-skubana-0.1.2 | lib/omniauth/strategies/skubana.rb |
omniauth-skubana-0.1.0 | lib/omniauth/strategies/skubana.rb |