Current WCF application has this ClaimsTransformer implementation. Is there a way to Configure/Implement the same in CoreWCF?
Configuration
<system.identityModel>
<identityConfiguration>
<claimsAuthenticationManager type="ClaimsTransformer, ClaimsTransformerLibrary" />
</identityConfiguration>
</system.identityModel>
And ClaimsTransformer adds some custom claims based on User roles.
public class CustomClaimsTransformer : IClaimsTransformation
{
public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
{
// claims transformation logic
return Task.FromResult(principal);
}
}
Added the ClaimsTransformer as a Middleware, but TransformAsync is not getting called on any request.
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Other service configurations
services.AddTransient<IClaimsTransformation, CustomClaimsTransformer>();
}
}