As according to http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg: "If the Client has not provided a value for sector_identifier_uri in Dynamic Client Registration [OpenID.Registration], the Sector Identifier used for pairwise identifier calculation is the host component of the registered redirect_uri."
19 lines
472 B
Ruby
19 lines
472 B
Ruby
module Api
|
|
module OpenidConnect
|
|
class UserInfoController < ApplicationController
|
|
include Api::OpenidConnect::ProtectedResourceEndpoint
|
|
|
|
before_action do
|
|
require_access_token %w(openid)
|
|
end
|
|
|
|
def show
|
|
render json: current_user, serializer: UserInfoSerializer, authorization: current_token.authorization
|
|
end
|
|
|
|
def current_user
|
|
current_token ? current_token.authorization.user : nil
|
|
end
|
|
end
|
|
end
|
|
end
|