Sha256: 677558ba102ad2954ed6001a1367af0d0d64d347fdae0534312752dad5db7a7c
Contents?: true
Size: 597 Bytes
Versions: 2
Compression:
Stored size: 597 Bytes
Contents
require 'rack/builder' require 'simple_admin_auth' require 'simple_admin_auth/rack' app = Rack::Builder.new do use Rack::Session::Cookie, secret: 'your_secret_here' use SimpleAdminAuth::Builder do provider :google_apps, :domain => 'embarkmobile.com', :name => 'admin' end map "/admin" do use SimpleAdminAuth::Rack run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['Welcome, you have been authenticated!']] } end map "/" do use SimpleAdminAuth::Application run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['Main site']] } end end run app
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_admin_auth-0.0.4 | config.ru |
simple_admin_auth-0.0.3 | config.ru |