简体   繁体   中英

How to implement custom OpenId provider in Asp.net MVC

I have to implement Intuit's openid authentication in our MVC 5 c# app. On their site , the specify the custom URL to post your authentication requests to: https://openid.intuit.com/OpenId/Provider .

In the base template for an MVC app, I see the ability to enable well known openid providers:

//OAuthWebSecurity.RegisterMicrosoftClient(
//    clientId: "",
//    clientSecret: "");

//OAuthWebSecurity.RegisterTwitterClient(
//    consumerKey: "",
//    consumerSecret: "");

//OAuthWebSecurity.RegisterMicrosoftClient(
//    clientId: "",
//    clientSecret: "");

//OAuthWebSecurity.RegisterTwitterClient(
//    consumerKey: "",
//    consumerSecret: "");

//OAuthWebSecurity.RegisterFacebookClient(
//    appId: "",
//    appSecret: "");

//OAuthWebSecurity.RegisterGoogleClient();

But since I need to connect to some other provider, how do I do it? I assume I need to create a custom provider somehow, but have not been able to find any example of how to do that.

This answer looked promising, but it links out to the actual example and the link is dead.

You do have to create a customer provider. See the code for GenericOpenIdClient.cs in this SO answer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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