Class: Rack::OAuth2::Server::Admin

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/rack/oauth2/server/admin.rb

Defined Under Namespace

Classes: Mount

Class Method Summary collapse

Class Method Details

.mount(path = "/oauth/admin") ⇒ Object

Returns Rack handle that mounts Admin on the specified path, and forwards all other requests back to the application.

/oauth/admin

Examples:

To include Web admin in Rails 2.x app:

config.middleware.use Rack::OAuth2::Server::Admin.mount

Parameters:

  • path (String, nil) (defaults to: "/oauth/admin")

    The path to mount on, defaults to

Returns:

  • (Object)

    Rack module



52
53
54
55
56
# File 'lib/rack/oauth2/server/admin.rb', line 52

def mount(path = "/oauth/admin")
  mount = Class.new(Mount)
  mount.mount Admin, "/oauth/admin"
  mount
end