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 had an idea for a new extension method that I started using in my projects
After sign-in task, I create a collection of claims. Usually this collection ends with the list of the roles, the user has.
Since a Jwt bearer token allows the user to have more values for the same type, my idea is to create an extension method that can add a list of string values for a given claim type
Here my example:
public static void Union(this IList claims, string claimType, IEnumerable values)
Could this approach be possible to avoid code duplication each time?
The text was updated successfully, but these errors were encountered:
I had an idea for a new extension method that I started using in my projects
After sign-in task, I create a collection of claims. Usually this collection ends with the list of the roles, the user has.
Since a Jwt bearer token allows the user to have more values for the same type, my idea is to create an extension method that can add a list of string values for a given claim type
Here my example:
public static void Union(this IList claims, string claimType, IEnumerable values)
Could this approach be possible to avoid code duplication each time?
The text was updated successfully, but these errors were encountered: