Module: Rack::OAuth2::Server::Authorize::RequestWithConnectParams

Defined in:
lib/rack/oauth2/server/authorize/request_with_connect_params.rb

Constant Summary collapse

CONNECT_EXT_PARAMS =
[
  :nonce, :display, :prompt, :max_age, :ui_locales, :claims_locales,
  :id_token_hint, :login_hint, :acr_values, :claims, :request, :request_uri
]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(klass) ⇒ Object



8
9
10
# File 'lib/rack/oauth2/server/authorize/request_with_connect_params.rb', line 8

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

Instance Method Details

#initialize(env) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/rack/oauth2/server/authorize/request_with_connect_params.rb', line 12

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

#openid_connect_request?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rack/oauth2/server/authorize/request_with_connect_params.rb', line 21

def openid_connect_request?
  scope.include?('openid')
end