Sha256: 73b063d5258a35d216b61c4fe35f29c6438a2d85967fb328c12c22500d198ec1

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

class Rack::OAuth2::Server::Authorize
  module RequestWithConnectParams
    CONNECT_EXT_PARAMS = [
      :nonce, :display, :prompt, :max_age, :ui_locales, :claims_locales,
      :id_token_hint, :login_hint, :acr_values, :claims, :request, :request_uri
    ]

    def self.prepended(klass)
      klass.send :attr_optional, *CONNECT_EXT_PARAMS
    end

    def initialize(env)
      super
      CONNECT_EXT_PARAMS.each do |attribute|
        self.send :"#{attribute}=", params[attribute.to_s]
      end
    end

    def openid_connect_request?
      scope.include?('openid')
    end
  end
  Request.send :prepend, RequestWithConnectParams
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openid_connect-0.11.1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-0.11.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb