Sha256: 67477652a9e634059b57bd9e6365d04848465e7d8031a5879e51a119633f93df

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

module Doorkeeper
  module OpenidConnect
    module Rails
      class Routes
        class Mapping
          attr_accessor :controllers, :as, :skips

          def initialize
            @controllers = {
              userinfo: 'doorkeeper/openid_connect/userinfo'
            }

            @as = {
              userinfo: :userinfo
            }

            @skips = []
          end

          def [](routes)
            {
              controllers: @controllers[routes],
              as: @as[routes]
            }
          end

          def skipped?(controller)
            @skips.include?(controller)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.0.1 lib/doorkeeper/openid_connect/rails/routes/mapping.rb
doorkeeper-openid_connect-1.0.0 lib/doorkeeper/openid_connect/rails/routes/mapping.rb