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
{{ message }}
This repository has been archived by the owner on Nov 19, 2017. It is now read-only.
Hi there,
I'm using claims transformation, to inject a CustomClaimsIdentity, that uses other properties than claims.
public CustomPrincipal(ClaimsPrincipal principal, Custom type, long userId) : this (principal)
{
RuleType = type;
UserId = userId;
}
public bool Method(List ids)
{
throw new NotImplementedException();
}
My problem is that when i get the user, i was getting a ClaimsPrincipal, that was not my Custom.
This is because you always create a new ClaimsPrincipal
{
var transformedPrincipal = await _options.ClaimsTransformation(context.Authentication.User);
context.Authentication.User = new ClaimsPrincipal(transformedPrincipal);
}
Is this really necessary? Do you know any problem that can happens if the new was removed and set to the transformedPrincipal?
Thanks
The text was updated successfully, but these errors were encountered:
Hi there,
I'm using claims transformation, to inject a CustomClaimsIdentity, that uses other properties than claims.
public CustomPrincipal(ClaimsPrincipal principal, Custom type, long userId) : this (principal)
{
RuleType = type;
UserId = userId;
}
public bool Method(List ids)
{
throw new NotImplementedException();
}
My problem is that when i get the user, i was getting a ClaimsPrincipal, that was not my Custom.
This is because you always create a new ClaimsPrincipal
{
var transformedPrincipal = await _options.ClaimsTransformation(context.Authentication.User);
context.Authentication.User = new ClaimsPrincipal(transformedPrincipal);
}
Is this really necessary? Do you know any problem that can happens if the new was removed and set to the transformedPrincipal?
Thanks
The text was updated successfully, but these errors were encountered: