Sha256: 76d860b03c0f35517fa4065e47ec1d8636f9705340f57d51c3534f9c15a8029b

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

require "bundler/setup"
require "sinatra/base"
require "omniauth-linkedin"

class App < Sinatra::Base
  get "/" do
    redirect "/auth/troopid"
  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 :linkedin, ENV["TROOPID_CONSUMER_KEY"], ENV["TROOPID_CONSUMER_SECRET"], :scope => "basic"
end

run App.new

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-troopid-0.1.2 example/config.ru
omniauth-troopid-0.1.0 example/config.ru