Sha256: b077f21be85953e296b8498aeb385e52f3632f7f1ab1310da19612c8f0fd46b1
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
$:.push File.dirname(__FILE__) + '/../lib' require 'omniauth-microsoft_graph' require 'sinatra' require 'json' set :port, 4200 client_id = ENV['AZURE_APPLICATION_CLIENT_ID'] secret = ENV['AZURE_APPLICATION_CLIENT_SECRET'] use Rack::Session::Cookie use OmniAuth::Builder do provider :microsoft_graph, client_id, secret end get '/' do "<a href='/auth/microsoft_graph'>Log in with Microsoft</a>" end get '/auth/microsoft_graph/callback' do content_type 'text/plain' request.env['omniauth.auth'].to_json end get '/auth/failure' do content_type 'text/plain' params.to_json end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-microsoft_graph-0.1.0 | example/example.rb |