Sha256: 52de3dcd738e39806cab178961967908e42852f0b40825779b7c086902cb00ae

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

require 'rubygems'
require 'bundler'

Bundler.setup :default, :development, :example
require 'sinatra'
require 'omniauth'
require 'omniauth-roomorama'

use Rack::Session::Cookie

use OmniAuth::Builder do
  provider :roomorama, "xhphaTy1kl0Yjqan1ZgHGw", "E9PVZNSWbluCqqSjy9wH8tUb6ttTkaHy6wV38724o"
end

get '/' do
  <<-HTML
<ul>
<li><a href='/auth/roomorama'>Sign in with Roomorama</a></li>
</ul>
HTML
end

get '/auth/:provider/callback' do
  content_type 'text/plain'
  request.env['omniauth.auth'].to_hash.inspect
end

get '/auth/failure' do
  content_type 'text/plain'
  params[:message]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-roomorama-0.1.0 example/sinatra.rb