SSO IN .NET Core MVC和.NET标准MVC

发布于 2025-02-02 04:53:47 字数 2730 浏览 5 评论 0 原文

  • 我有第三方SSO可以在我的两个公司传统系统中实施。

  • 一个在.NET标准MVC中,第二个在.NET Core MVC中。我已经使用 services.addoauth()成功地在.NET Core应用程序上实现了SSO,但是我找不到在标准MVC应用程序中执行相同的资源。

  • 这是我的.NET Core App的实现快照。

问题:

  • 现在尝试在标准MVC应用中实现相同的问题,我无法为此找到适当的资源,或者至少我不知道如何如何继续。
  • 该文档建议首先我必须调用/oauth/授权,它将给我 comapany登录页面,在成功登录后,系统将使我访问Redirecturl ,然后在之后我必须调用/oauth/token
  • 我考虑使用RESTCLIENT或HTTPCLIENT获取访问代码,但是没有使用公司登录页面,我无法获得它,这对我来说是一个很大的阻碍。到目前为止,

我尝试过的是什么?

任何帮助或线索或想法将不胜感激。谢谢!

编辑-1

  • 我已经使用了 app.useopenidconnectauthentication(),我能够检索访问代码,但仍然无法弄清楚如何弄清楚如何获得令牌。尝试了各种方式,包括Tokenclient,MsalappBuilder等,但到目前为止还没有运气。
  • I have third party SSO to implement in Two of my companies legacy system's.

  • One is in .Net standard MVC while second is in .Net core MVC. I have successfully implemented the SSO on .Net core app using services.AddOAuth() but I cann't find proper resources to do same in Standard MVC app.

  • Here is my implementation snapshot of .Net core app.

enter image description here

The problem:

  • Now when I tries to implement same in Standard MVC app, I'm not able to find proper resources for that or at least I have no idea how to proceed.
  • The document suggests that first I have to call /oauth/authorize which will give me Comapany Login page and after successful login, system will give me access code to redirectUrl and then after I have to call /oauth/token.
  • I thought of using RestClient or Httpclient to get access code but without using company login page, I can't get it and that's a big blocker for me at the moment.

What I tried so far?

Any help or clue or idea will be really appreciated. Thanks!

EDIT - 1

  • I have used app.UseOpenIdConnectAuthentication() and I'm able to retrieve the access code but still not able to figure out how to get token. tried various ways including TokenClient, MsalAppBuilder etc but no luck so far.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文