简体   繁体   English

如何将 Net 6 身份授权流向 YARP Proxied Net Framework App

[英]How to flow Net 6 Identity Authorisation to YARP Proxied Net Framework App

I'm trying to use the strangler fig pattern to migrate a legacy Net Framework MVC app in stages.我正在尝试使用 strangler fig 模式分阶段迁移旧版 Net Framework MVC 应用程序。 I heard a talk by Mark Rendle about using YARP to migrate a Webforms app this way, which was great.我听过 Mark Rendle 关于使用 YARP 以这种方式迁移 Webforms 应用程序的演讲,非常棒。 However, I can't find any examples anywhere of using this methodology to migrate from a Net Framework MVC app to new Net 6 MVC app.但是,我无法在任何地方找到任何使用此方法从 Net Framework MVC 应用程序迁移到新的 Net 6 MVC 应用程序的示例。

I've managed to set up the basic proxy which is working (see example repo below).我已经设法设置了正在运行的基本代理(请参阅下面的示例 repo)。 However I don't know where to begin with flowing the Identity Authentication through from the Net 6 App to the Net Framework app.但是我不知道从哪里开始将身份验证从 Net 6 应用程序流到 Net Framework 应用程序。 I can see that the auth cookie is passed through to the proxied Net Framework app, but I don't know how to take that and say "hey use this" in the Framework app.我可以看到 auth cookie 已传递到代理的 Net Framework 应用程序,但我不知道如何接受它并在 Framework 应用程序中说“嘿使用这个”。

Links:链接:

Any pointers on how to achieve this authentication flow would be greatly appreciated.非常感谢任何有关如何实现此身份验证流程的指示。

Microsoft must have been getting this a lot...微软一定得到了很多......

They have created a new nuget package (currently in preview):他们创建了一个新的 nuget package(目前处于预览状态):

Microsoft.AspNetCore.SystemWebAdapters Microsoft.AspNetCore.SystemWebAdapters

And have an article on its use (thanks Mike Rousos:):并有一篇关于它的使用的文章(感谢 Mike Rousos:):

https://devblogs.microsoft.com/do.net/incremental-asp.net-migration-tooling-preview-2/ https://devblogs.microsoft.com/do.net/incremental-asp.net-migration-tooling-preview-2/

I have updated my example git repo and reworked a few bits and everything seems to be working as expected.我已经更新了我的示例 git 存储库并修改了一些内容,一切似乎都按预期工作。

Happy days.快乐的时光。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 多租户spa应用程序和授权中的Identityserver和asp.net身份 - Identityserver and asp.net identity in multitenant spa application and authorisation 将 ASP.NET 角色授权与 IdentityServer3 隐式流结合使用 - Using ASP.NET Role Authorisation with IdentityServer3 implicit flow 使用 asp.net Identity 进行 Azure AD 身份验证以进行授权 - Azure AD authentication with asp.net Identity for authorisation ASP.NET身份框架(表单)如何使用bootstrap - How do ASP.NET Identity framework (forms) with bootstrap 如何使用ASP.NET Identity Framework设置密码到期 - How to setup password expiration using ASP.NET Identity Framework 如何使用基于Dot net框架的身份服务器4和windows服务? - How to use identity server 4 with windows service based on Dot net framework? 如何检查用户是否在 Asp.Net Core Identity Framework 中担任角色 - How to check if a user is in a role in Asp.Net Core Identity Framework 如何在ASP.NET Identity框架中对用户进行身份验证? - How do I authenticate user in ASP.NET Identity framework? 如何使用身份和实体框架在.NET Core 2.0中管理身份验证和授权 - How to manage authentication and authroization in .NET Core 2.0 with Identity & Entity Framework 如何使用Asp.Net.Identity和Entity Framework 6在Asp.Net Core 2.0 Target Framework 4.6.1中设置身份? - How can I setup identity in Asp.Net Core 2.0 Target Framework 4.6.1 using Asp.Net.Identity and Entity Framework 6?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM