rack-oauth2-server icon indicating copy to clipboard operation
rack-oauth2-server copied to clipboard

oauth-webadmin documentation seems to be outdated?

Open rb2k opened this issue 13 years ago • 1 comments

This is the suggested syntax for the config.ru:

Rack::Builder.new do
  map("/oauth/admin") { run Rack::OAuth2::Server::Admin }
  map("/") { run MyApp }
end

This results in the folllowing error for me:
"/Users/mseeger/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.0/lib/rack/builder.rb:129:in `to_app': missing run or map statement (RuntimeError)"

Just using:

map("/oauth/admin") { run Rack::OAuth2::Server::Admin }
map("/") { run MyApp }

Seems to work for me though

rb2k avatar Jan 06 '12 13:01 rb2k

Alternatively:

app = Rack::Builder.new do
  map('/oauth/admin') { run Rack::OAuth2::Server::Admin }
  map("/") { run MyApp }
end

run app

kjw avatar Dec 07 '12 11:12 kjw