dotnetopenauth

OAuthWebSecurity - Without OpenID

大城市里の小女人 提交于 2020-01-03 05:19:41
问题 Is it DotNetOpenAuth OAuthWebSecurity only for OpenID Providers? OAuthWebSecurity.RegisterClient(new CutomOAuth2Client("ID", "KEY"), "CustomProvider", null); Or could I base my entire authentication in a external OAuth Provider that doesn't implement OpenID? The scenario is likely if I want to develop a client for facebook but facebook isn't a OpenId provider... 回答1: Yes you can base your authentication on an external OAuth provider. I just made this SO post: How to let users login to my site

DotNetOpenAuth OAuth 2.0 authorization with Google

妖精的绣舞 提交于 2020-01-02 17:20:24
问题 I am trying to use DNOA to connect with Facebook and Google over OAuth 2.0. The same code is working with Facebook, but isn't working with Google IAuthorizationState authorization = client.ProcessUserAuthorization(request); if (authorization == null) { // Kick off authorization request client.RequestUserAuthorization(openAuthClient.scope, new Uri(redirectUrl)); } The question is why? I start logging DNOA request and found following: 2014-03-27 12:20:19,497 (GMT+9) [6] DEBUG DotNetOpenAuth

How to implement custom OpenID Relying Party in MVC 4

跟風遠走 提交于 2020-01-01 14:44:10
问题 I like the new MVC OpenID/OAuth login feature, but I want to know how to add a new login button, for example I want my users to login using their StackExchange account or using their OpenID url the same as in stackoverflow http://puu.sh/13rm0 How to do that? Are there any samples showing this in steps? 回答1: Unfortunately the API Microsoft exposes is limited to login providers that are hard-coded to a specific URL -- not one that can accept input from the user before logging the user in, which

DotNetOpenAuth RP fails behind SSL appliance

孤街浪徒 提交于 2020-01-01 09:25:09
问题 I'm having trouble getting a DNOA RP working behind an SSL appliance (terminates the client HTTPS connection and reverse-proxies HTTP to the webserver behind it). The problem is that the RP is incorrectly guessing the recipient endpoint from the incoming request (since it's not HTTPS by the time it hits the webserver) and comparing the endpoint with scheme on the return_to url (which is HTTPS)- it fails with the stacktrace below. I've spelunked around in the code a bit and I don't see a way

DotNetOpenId — “This message has already been processed” Error

百般思念 提交于 2019-12-31 05:04:08
问题 I'm starting with OpenId using the dotnetopenid library and, so far, so good, but when I try to login, it shows me the following message: This message has already been processed. This could indicate a replay attack in progress. The first time I used my app it failed and, after that, the above message it is always returned. How can I "logout" the user that I'm using for testing or how can I can clear the request so I can login/logout? Thanks in advance! =) 回答1: I found the problem, a seely

How do I pull DotNetOpenAuth assembly references into unit test project for ASP.NET MVC4 solution?

蓝咒 提交于 2019-12-31 03:55:06
问题 Tl;dr version: I am stuck with the exception: System.IO.FileLoadException : Could not load file or assembly 'DotNetOpenAuth.AspNet, Version 4. 0 .0.0 ... A bit dismayed that msft used so many static classes and methods for auth in the new MVC4 project template. Want to wrap all membership/auth functionality into a class that implements an interface so that I can mock for unit tests. After a couple of evenings of struggling, I have decided to start from scratch, so I removed all DotNetOpenAuth

Openid redirect not working

二次信任 提交于 2019-12-25 16:45:00
问题 I tried this example for openid in http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx I applied the same code in my newly created project , I get this error when i click the google icon in the logon page. I din change any code from the sample project I downloaded from this website, still I get this error . 回答1: This sounds just like an MVC controller problem. your Account controller is expected to have an

What should i store as UserName from DotNetOpenAuth

帅比萌擦擦* 提交于 2019-12-25 08:59:54
问题 Im using DotNetOpenAuth to integrate Google,Yahoo,Twitter and Facebook Logins into my application. Now everything works as expected. Twitter returns -> User-name and Claim-identifier(Just Id) Google returns -> Email-Address, First and last Name and ID(URL+ID) Yahoo returns -> Email-Address, Alias and ID (Url + ID) Also im also allowing my users to register internally so my database User table is like this: ID,UserName,Name,OpenID,LoginType,DisplayName im wondering what i should be storing as

IIS7 DotNetOpenAuth Custom LinkedInClinet Response is not available in current context

半世苍凉 提交于 2019-12-25 02:38:06
问题 I am using dotnetopneauth's Custom LinkedInClient available at following link: DotNetOpenAuth LinkedIn Client github link It works on my development machine. I hosted it on Windows Server 2008 R2 Enterprise (64-bit). It works fine there too. But I am switching it to another server with Windows Server 2008 R2 Standard (64-bit) and its creating problem here. On this server it gives me error "Response is not available in current context". Please see the attached image for stack trace. I've tried

401 (Unauthorized) Error with DotNetOpenAuth and Google Calendar

我的梦境 提交于 2019-12-24 16:25:17
问题 I've been tinkering for a while now with getting the Google Calendar API working with DotNetOpenAuth. I've tried going about it in a few different ways, and I keep running up against the following error: The remote server returned an error: (401) Unauthorized. I've tried it both by using the CalendarService in the Google Data API for .NET, and by adapting the Google Contacts sample in the DotNetOpenAuth samples project. When I tried using the CalendarService, I set up my service for