Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/maestrano/rails/routing/routes.rb

Instance Method Summary collapse

Instance Method Details

#maestrano_routesObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/maestrano/rails/routing/routes.rb', line 3

def maestrano_routes
  namespace :maestrano do
    namespace :auth do
      resources :saml, only:[] do
        # GET /maestrano/auth/saml/init
        get 'init', on: :collection, to: 'saml#init', as: :default

        # GET /maestrano/auth/saml/init/mytenant
        get 'init/:tenant', on: :collection, to: 'saml#init', as: :tenant

        # POST /maestrano/auth/saml/consume
        post 'consume', on: :collection, to: 'saml#consume'

        # POST /maestrano/auth/saml/consume/mytenant
        post 'consume/:tenant', on: :collection, to: 'saml#consume'
      end
    end

    namespace :account do
      # DELETE /maestrano/account/groups/cld-1234
      delete 'groups/:id', to: 'groups#destroy'

      # DELETE /maestrano/account/groups/cld-1234/mytenant
      delete 'groups/:id/:tenant', to: 'groups#destroy'

      # DELETE /maestrano/account/groups/cld-1234/users/usr-1234
      delete 'groups/:group_id/users/:id', to: 'group_users#destroy'

      # DELETE /maestrano/account/groups/cld-1234/users/usr-1234/mytenant
      delete 'groups/:group_id/users/:id/:tenant', to: 'group_users#destroy'
    end
  end
end