dotnetopenauth

How do I Integrate OpenID into MVC4 Web API

时间秒杀一切 提交于 2019-12-03 03:43:56
问题 I am writing a Web API using MVC4 that should be consumed by multiple client types. I want to use the OpenID to authenticate. I already have downloaded the DotNetOpenAuth NuGet package, but so far all of the examples are for a client app, rather than an API. My problem is simple. I want to have clients send an authentication request to my API. The API authenticates with an OpenID provider. The API then sets whatever it needs to in order to use the [Authorize] tags throughout the web api calls

Storing DotNetOpenAuth information and user info retrieval

扶醉桌前 提交于 2019-12-03 02:03:00
问题 This question is a bit of a structural/design question as I'm having trouble working out the best way to perform the task. In my MVC app, I am using DotNetOpenAuth (3.4) as my login information provider and just using the standard FormsAuthentication for cookies etc. The current user table in the DB has: UserId (PK, uniqueidentifier) OpenIdIdentifier (nvarchar(255)) OpenIdDisplay (nvarchar(255)) Displayname (nvarchar(50)) Email (nvarchar(50)) PhoneNumber (nvarchar(50)) As the UserId is the

DotNetOpenAuth oAuth in ASP.NET MVC [closed]

拈花ヽ惹草 提交于 2019-12-03 01:56:38
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm trying to understand how to apply the oAuth consumer library from DotNetOpenAuth in the context of ASP.NET MVC. oAuth is new to me

Implementing .Net OpenId with ASP.Net MVC

馋奶兔 提交于 2019-12-03 00:37:58
The sample I downloaded from DotNetOpenId has different files than the MVC 1.0 application I get when I create a new application. I am new to MVC and openId, all the examples I have come across are very old. Can anyone point me to examples of implementing Openid with ASP.net MVC using DotNetOpenId. Rob Conery has a template available for MVC that has DotNetOpenId already configured and ready to go. Available at: http://blog.wekeroad.com/blog/putting-the-ldquo-m-rdquo-back-in-mvc/ 来源: https://stackoverflow.com/questions/961468/implementing-net-openid-with-asp-net-mvc

Why am I not receiving a RefreshToken from a Google OAuth request?

旧街凉风 提交于 2019-12-03 00:28:21
I am attempting to integrate Google Calendar into my application and I am having some problems with the OAuth authorization passing off a RefreshToken. I receive an AccessToken with no issue, but the RefreshToken property is null. See the line marked "ERROR HERE:" for where I am having the issue My Asp.Net MVC controller (named OAuthController ) looks like the following: public ActionResult Index() { var client = CreateClient(); client.RequestUserAuthorization(new[] { "https://www.googleapis.com/auth/calendar" }, new Uri("http://localhost/FL.Evaluation.Web/OAuth/CallBack")); return View(); }

DotNetOpenAuth: How to implement a simple OpenId provider?

别等时光非礼了梦想. 提交于 2019-12-02 21:24:35
Every OpenId provider has a provider Url (e.g Google: https://www.google.com/accounts/o8/id ) Using OpenIdRelyingParty.CreateRequest I successfully managed to redirect the user to Google provider Url and receive the provider callback. Everything worked fine. Now I'm trying to implement my own simple OpenId provider (I want to act as Google on my example). DotNetOpenAuth has a provider demo called OpenIdProviderWebForms. For the last 4 or 5 hours I've been tryng to connect to it using the same demo I managed to connect on Google. First: It's not clear to me what URL should I call. I tried all

DotNetOpenAuth: Webforms, Getting Started

六月ゝ 毕业季﹏ 提交于 2019-12-02 20:46:55
I am trying to figure out how to get DotNetOpenAuth( http://www.dotnetopenauth.net/ ) working in my webforms app I don't understand where to begin. I have an OpenIDSelector on my Login.aspx that lets you choose google or Yahoo. You can choose one, then a popup comes up, and lets you login. Once you login the program hangs because it is trying to do something with a database ??? Can't I just use some control(like the OpenIDSelector) and get back that the user was authenticated, get their ClaimedID and handle the rest myself? EDIT: Trying to get started with OpenID in Webforms? Go Here... https:

How is OpenID implemented?

纵饮孤独 提交于 2019-12-02 19:08:18
How would you design and implement OpenID components? (Was "How does OpenId work") I realize this question is somewhat of a duplicate , and yes, I have read the spec and the wikipedia article . After reading the materials mentioned above, I still don't have a complete picture in my head of how each step in the process is handled. Maybe what's missing is a good workflow diagram for how an implementation of OpenID works. I'm considering incorporating OpenID into one of my applications to accomodate a B2B single-sign-on scenario, and I will probably go with DotNetOpenID instead of trying to

Storing DotNetOpenAuth information and user info retrieval

烈酒焚心 提交于 2019-12-02 17:11:33
This question is a bit of a structural/design question as I'm having trouble working out the best way to perform the task. In my MVC app, I am using DotNetOpenAuth (3.4) as my login information provider and just using the standard FormsAuthentication for cookies etc. The current user table in the DB has: UserId (PK, uniqueidentifier) OpenIdIdentifier (nvarchar(255)) OpenIdDisplay (nvarchar(255)) Displayname (nvarchar(50)) Email (nvarchar(50)) PhoneNumber (nvarchar(50)) As the UserId is the clear identifier for a user (they should be able to change their OpenId provider at a later date), it is

How do I Integrate OpenID into MVC4 Web API

二次信任 提交于 2019-12-02 15:59:48
I am writing a Web API using MVC4 that should be consumed by multiple client types. I want to use the OpenID to authenticate. I already have downloaded the DotNetOpenAuth NuGet package, but so far all of the examples are for a client app, rather than an API. My problem is simple. I want to have clients send an authentication request to my API. The API authenticates with an OpenID provider. The API then sets whatever it needs to in order to use the [Authorize] tags throughout the web api calls. I understand that in .NET applications, that the FormsAuthentication.SetCookie could be called, but