Sha256: 3e14e68bd1613b76bd669f876f7e58cadd5ce75df67d882977bfba4372aa5709

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

module ActionDispatch::Routing
  class Mapper
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
maestrano-rails-1.0.4 lib/maestrano/rails/routing/routes.rb
maestrano-rails-1.0.3 lib/maestrano/rails/routing/routes.rb
maestrano-rails-1.0.2 lib/maestrano/rails/routing/routes.rb