Class: OIDCProvider::AccountToUserInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/oidc_provider/account_to_user_info.rb

Instance Method Summary collapse

Instance Method Details

#call(account, scope_names) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/oidc_provider/account_to_user_info.rb', line 3

def call(, scope_names)
  scopes = scope_names.map { |name| OIDCProvider.supported_scopes.detect { |scope| scope.name == name } }.compact
  OpenIDConnect::ResponseObject::UserInfo.new(sub: .send(OIDCProvider.)).tap do ||
    scopes.each do |scope|
      UserInfoBuilder.new(, ).run(&scope.work)
    end
  end
end