assaf/rack-oauth2-server — Issue #5: Admin interface documentation outdated?
Author: P9GIT
Created: 2012-01-30 10:23:34+00:00
State: open

Hi.

First of all, thank you for a great gem!

When I followed the configuration doc on how to set up the Admin interface I ran into this error:

.../config/application.rb:54: undefined method `set' for # (NoMethodError)

I have added this to my application.rb:

# Configure OAuth2 Admin interface
config.after_initialize do
Rack::OAuth2::Server::Admin.set :client_id, "XXX"
Rack::OAuth2::Server::Admin.set :client_secret, "XXX"
Rack::OAuth2::Server::Admin.set :scope, %w{read write}
end

If I include Sinatra like this: require 'sinatra', in the application.rb file I get this error:

../config/application.rb:55: private method `set' called for # (NoMethodError)

Seems like it's not possible at all to use "set" like it is described in the doc?
How can I get the Admin interface to work?

Best regards,
Thomas.