Sha256: ce8f8507579136271c4cc084c016d6c94aec7a298d4caa8a37800271e259b995

Contents?: true

Size: 515 Bytes

Versions: 3

Compression:

Stored size: 515 Bytes

Contents

require 'bundler/setup'
require 'sinatra/base'
require 'omniauth-fitcvut-oauth2'

class App < Sinatra::Base
  get '/' do
    redirect '/auth/fitcvut_oauth2'
  end

  get '/auth/:provider/callback' do
    content_type 'application/json'
    MultiJson.encode(request.env)
  end
  
  get '/auth/failure' do
    content_type 'application/json'
    MultiJson.encode(request.env)
  end
end

use Rack::Session::Cookie

use OmniAuth::Builder do
  provider :fitcvut_oauth2, ENV['APP_ID'], ENV['APP_SECRET']
end

run App.new

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
omniauth-fitcvut-oauth2-0.2.1 example/config.ru
omniauth-fitcvut-oauth2-0.2.0 example/config.ru
omniauth-fitcvut-oauth2-0.1.0 example/config.ru