You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to provide an all_data scope that acts as a summary of more focused scopes (eg profile and email), like so:
claims do
# Profile scope
claim :given_name, scope: :profile do |user, scopes, access_token|
user.first_name
end
# Email scope
claim :email, scope: :email do |user, scopes, access_token|
user.email
end
# All data scope
claim :given_name, scope: :all_data do |user, scopes, access_token|
user.first_name
end
claim :email, scope: :all_data do |user, scopes, access_token|
user.email
end
end
From my testing, this currently breaks scope requests for just profile or email, because the claims OpenStruct (from ClaimsBuilder) uses the claim symbols as keys, thereby overwriting duplicate claim definitions and only storing the claims under the all_data scope.
I also can't find in the OIDC spec whether it should be possible to have claims assigned to multiple scopes - does anyone know?
The text was updated successfully, but these errors were encountered:
I don't think this is currently possible, maybe one solution could be to let the scope: argument support arrays, so you'd have scope: [:profile, :all_data] etc.?
I would like to provide an
all_data
scope that acts as a summary of more focused scopes (egprofile
andemail
), like so:From my testing, this currently breaks scope requests for just
profile
oremail
, because theclaims
OpenStruct (fromClaimsBuilder
) uses the claim symbols as keys, thereby overwriting duplicate claim definitions and only storing the claims under theall_data
scope.I also can't find in the OIDC spec whether it should be possible to have claims assigned to multiple scopes - does anyone know?
The text was updated successfully, but these errors were encountered: