Sha256: 0c71eb93d7ccadf6133ab66f0a1473c9142f815cb846becf8c6604aa91f9e18d
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
$:.push File.dirname(__FILE__) + '/../lib' require 'omniauth-azure-oauth2-v3' require 'sinatra' class MyAzureProvider def self.client_id ENV['AZURE_CLIENT_ID'] end def self.client_secret ENV['AZURE_CLIENT_SECRET'] end def self.tenant_id ENV['AZURE_TENANT_ID'] end end use Rack::Session::Cookie use OmniAuth::Strategies::Azure, MyAzureProvider get '/' do "<a href='/auth/azure_oauth2'>Log in with Azure</a>" end get '/auth/azure_oauth2/callback' do content_type 'text/plain' request.env['omniauth.auth'].inspect end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-azure-oauth2-v2-0.1.2 | examples/sinatra.rb |