简体   繁体   English

在MVC应用程序中使用OKTA进行“单一登录”

[英]“Single Sign on” using OKTA in an MVC Application

I need to implement the "Single Sign on" using OKTA in an MVC Application. 我需要在MVC应用程序中使用OKTA实现“单一登录”。 I have created an account on Okta and created an application. 我已经在Okta上创建了一个帐户并创建了一个应用程序。

I can able to get the details such as Identity Provider Single Sign-On URL,Identity Provider Issuer and X.509 Certificate from OKTA. 我可以从OKTA获取详细信息,例如身份提供者单一登录URL,身份提供者颁发者和X.509证书。

But I am not able to configure it in to the MVC site. 但是我无法将其配置到MVC站点中。

Does any body know how can I configure "Single Sign on" using OKTA in an MVC Application? 有谁知道如何在MVC应用程序中使用OKTA配置“单一登录”?

I'd recommend taking a look at the sample applications available on github.com/oktadeveloper . 我建议看一下github.com/oktadeveloper上可用的示例应用程序。

For SSO, this ASP.NET project is a great example using OpenID Connect to walk you through this process. 对于SSO,此ASP.NET项目是使用OpenID Connect指导您完成此过程的一个很好的示例。

We're currently adopting Okta, and chose to use SAML. 我们目前正在采用Okta,并选择使用SAML。 I found the info at Okta Blog very helpful. 我发现Okta博客中的信息非常有帮助。 In this Blog they reference a module by Kentor IT, which makes implementing SAML really easy. 在此博客中,他们引用了Kentor IT的模块,该模块使实施SAML变得非常容易。

Keep in mind, the currentversion is 0.20, so you might have to tweak a little. 请记住,currentversion为0.20,因此您可能需要进行一些调整。

  • .Net version should be 4.6.2, or you have to go to SHA1 encryption instead of SHA256 .Net版本应为4.6.2,否则您必须使用SHA1加密而不是SHA256
  • We had to handle the way Okta gives back groups, where we needed roles (hint: Within 'Group Attribute Statements' set Name to ' http://schemas.microsoft.com/ws/2008/06/identity/claims/role ' and Name format to URI. This way groups will be added as Role claim to the SAML token 我们必须处理Okta返还需要角色的组的方式(提示:在“ Group Attribute Statements”中,将Name设置为“ http://schemas.microsoft.com/ws/2008/06/identity/claims/role ”以及将名称格式转换为URI。这样,会将组作为“角色声明”添加到SAML令牌

Happy Okta'ing 快乐的Okta'ing

Gerwin 格温

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM