1 # frozen_string_literal: true
3 Doorkeeper::OpenidConnect.configure do
4 issuer do |_resource_owner, _application|
5 "#{Settings.server_protocol}://#{Settings.server_url}"
8 signing_key Settings.doorkeeper_signing_key
10 subject_types_supported [:public]
12 resource_owner_from_access_token do |access_token|
13 User.find_by(:id => access_token.resource_owner_id)
16 auth_time_from_resource_owner do |resource_owner|
17 # empty block necessary as a workaround to missing configuration
18 # when no auth_time claim is provided
21 subject do |resource_owner, _application|
26 Settings.server_protocol.to_sym
30 claim :preferred_username, :scope => :openid do |resource_owner, _scopes, _access_token|
31 resource_owner.display_name
34 claim :email, :scope => :read_email, :response => [:id_token, :user_info] do |resource_owner, _scopes, _access_token|