Class: OpenIDConnect::Client

Inherits:
Rack::OAuth2::Client
  • Object
show all
Defined in:
lib/openid_connect/client.rb,
lib/openid_connect/client/registrar.rb

Defined Under Namespace

Classes: Registrar

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Client

Returns a new instance of Client.



5
6
7
8
# File 'lib/openid_connect/client.rb', line 5

def initialize(attributes = {})
  super attributes
  self.userinfo_endpoint ||= '/userinfo'
end

Instance Method Details

#authorization_uri(params = {}) ⇒ Object



10
11
12
13
14
# File 'lib/openid_connect/client.rb', line 10

def authorization_uri(params = {})
  params[:scope] = setup_required_scope params[:scope]
  params[:prompt] = Array(params[:prompt]).join(' ')
  super
end

#userinfo_uriObject



16
17
18
# File 'lib/openid_connect/client.rb', line 16

def userinfo_uri
  absolute_uri_for userinfo_endpoint
end