Class: Doorkeeper::Rails::Routes
- Inherits:
-
Object
- Object
- Doorkeeper::Rails::Routes
- Extended by:
- Registry
- Includes:
- AbstractRouter
- Defined in:
- lib/doorkeeper/rails/routes.rb,
lib/doorkeeper/rails/routes/mapper.rb,
lib/doorkeeper/rails/routes/mapping.rb,
lib/doorkeeper/rails/routes/registry.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Helper, Registry Classes: Mapper, Mapping
Constant Summary
Constants included from Registry
Registry::InvalidRouterClass, Registry::ROUTES_ACCESS_LOCK, Registry::ROUTES_DEFINITION_LOCK
Instance Attribute Summary
Attributes included from AbstractRouter
Class Method Summary collapse
Instance Method Summary collapse
- #generate_routes!(options) ⇒ Object
-
#initialize(routes, mapper = Mapper.new, &block) ⇒ Routes
constructor
A new instance of Routes.
Methods included from Registry
register_routes, registered_routes
Constructor Details
Class Method Details
.install! ⇒ Object
24 25 26 27 28 |
# File 'lib/doorkeeper/rails/routes.rb', line 24 def self.install! ActionDispatch::Routing::Mapper.include Doorkeeper::Rails::Routes::Helper registered_routes.each(&:install!) end |
Instance Method Details
#generate_routes!(options) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/doorkeeper/rails/routes.rb', line 34 def generate_routes!() routes.scope [:scope] || "oauth", as: "oauth" do map_route(:authorizations, :authorization_routes) map_route(:tokens, :token_routes) map_route(:tokens, :revoke_routes) map_route(:tokens, :introspect_routes) if introspection_routes? map_route(:applications, :application_routes) map_route(:authorized_applications, :authorized_applications_routes) map_route(:token_info, :token_info_routes) end end |