是否可以将现有的ASP.NET Core AuthenticationHandler与ServiceStack一起使用?

时间:2019-01-22 14:04:58

标签: authentication asp.net-core servicestack

我有一个自定义AuthenticationHandler来绑定到ASP.NET Core中基于声明的授权。 ServiceStack是否可以重用此组件,或者我必须将其实现为自定义AuthProvider

1 个答案:

答案 0 :(得分:2)

看看新的mvcidentity .NET Core template,它显示了一个使用ASP.NET身份验证Auth来保护MVC和ServiceStack Services的示例。

integration is enabled with the new NetCoreIdentityAuthProvider提供了双向适配器,可以在ASP.NET Core ClaimsPrincipal和ServiceStack用户会话之间进行转换。