The route /api/v0/user/ will now be used as a non-OIDC route. In other words, the /api/v0/user/ will require the "read" scope while /api/openid_connect/user_info/ will require the "openid" scope
23 lines
443 B
Ruby
23 lines
443 B
Ruby
class UserInfoSerializer < ActiveModel::Serializer
|
|
attributes :sub, :nickname, :profile, :picture, :zoneinfo
|
|
|
|
def sub
|
|
object.diaspora_handle # TODO: Change to proper sub
|
|
end
|
|
|
|
def nickname
|
|
object.name
|
|
end
|
|
|
|
def profile
|
|
File.join(AppConfig.environment.url, "people", object.guid).to_s
|
|
end
|
|
|
|
def picture
|
|
File.join(AppConfig.environment.url, object.image_url).to_s
|
|
end
|
|
|
|
def zoneinfo
|
|
object.language
|
|
end
|
|
end
|