Sha256: e104fec708e282f2d0e61a274eb226e243eda73cf9063c7665c64d413b8bacbd

Contents?: true

Size: 730 Bytes

Versions: 26

Compression:

Stored size: 730 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
      self.prompt = Array(prompt.to_s.split(' '))
      self.max_age = max_age.try(:to_i)
    end

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
openid_connect-2.3.1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.3.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.2.1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.2.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.1.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.0.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-2.0.0.rc1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.4.2 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.4.1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.4.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.3.1 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.3.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.2.0 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.8 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.7 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.6 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.5 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.4 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.3 lib/rack/oauth2/server/authorize/request_with_connect_params.rb
openid_connect-1.1.2 lib/rack/oauth2/server/authorize/request_with_connect_params.rb