Skip to content

Instantly share code, notes, and snippets.

@coderforhire
Created June 2, 2012 02:49
Show Gist options
  • Save coderforhire/2856283 to your computer and use it in GitHub Desktop.
Save coderforhire/2856283 to your computer and use it in GitHub Desktop.
require 'omniauth/strategies/oauth2'
require 'base64'
require 'openssl'
require 'rack/utils'
require 'multi_json'
require 'stripe'
module OmniAuth
module Strategies
class Stripeplatform < OmniAuth::Strategies::OAuth2
class NoAuthorizationCodeError < StandardError; end
option :name, "stripeplatform"
option :client_options, {
:site => 'https://manage.stripe.com',
:authorize_url => '/oauth2/authorize',
:token_url => '/oauth2/token'
}
option :access_token_options, {
:header_format => 'OAuth %s',
:param_name => 'access_token'
}
info do
{
'email' => email,
}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment