dasiths/NEasyAuthMiddleware

Commas in name result in truncation

Closed this issue · 2 comments

Having commas in the name field result in the name being truncated. I assume this is due to the Split(',') call in the middleware.

{ "typ": "name", "val": "User, Mock" }

Results in only "User" being added to the claim as the Identity.

You mean here?

claims.AddRange(claimsModel.Value.Split(',')

Fixed in 6a8f215

This allows customisation of the behaviour via EasyAuthOptions.ClaimTypesWithCommaSeparatedValues setting.