The same functionality that this class aims to accomplish can be accomplished just the same by simple adding additional roles to the current ClaimsPrincipal (potentially by attaching these additional roles in an additional ClaimsIdentity that gets added to the ClaimsPrincipal) associated with the current request.
The same functionality that this class aims to accomplish can be accomplished just the same by simple adding additional roles to the current
ClaimsPrincipal
(potentially by attaching these additional roles in an additionalClaimsIdentity
that gets added to theClaimsPrincipal
) associated with the current request.This can be done manually, or via an
IClaimsTransformation
a la https://github.com/aspnet/AuthSamples/tree/6882459a248c10e414e5d1744a9b0845f5727868/samples/ClaimsTransformation (another example at https://brockallen.com/2017/08/30/beware-in-asp-net-core-2-0-claims-transformation-might-run-multiple-times/ )