dotnetopenauth

MVC5 Redirects to Login.aspx when using Windows Authentication

穿精又带淫゛_ 提交于 2019-11-29 05:00:35
问题 After upgrading from MVC 4 to MVC 5, my application (when started from within Visual Studio) gives the following error. It might also be worth noting that I am hosting both MVC5 and WebAPI2 items in the same project as there may be interference going on. I also installed the dotnetopenauth nuget package (which I have since removed): Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have

How to configure dotNetOpenId in an session less load balancing environment

假如想象 提交于 2019-11-29 03:15:40
问题 You've probably solved this before. I need to be able to use open id in an environment that does not have session stickiness. The servers do preserve the headers. I'm using ASP.NET MVC and dotNetOpenId version 3.2.0.9177. Although the authentication on the 3rd party web site goes without a hitch when returning the response I get an error and authentication fails. Any thoughts? 回答1: Stateful The most optimized method is to write a custom persistence store that implements

DotNetOpenAuth not working with MVC 5 RC

走远了吗. 提交于 2019-11-28 23:39:11
问题 I have been working a lot with DotNetOpenAuth. First we used 5.0.0-alpha1 but we switched over to v4.0.30319 because we couldn't find what was causing our problems. We are building a C# Web API project on .NET 4.5.1 RC with MVC 5 RC in Visual Studio 2013. We have implemented IAuthorizationServerHost , INonceStore , and ICryptoKeyStore . The problem that we have are around the following case: public class TokensController : Controller { private readonly AuthorizationServer authorizationServer

OAuth2 and DotNetOpenAuth - implementing Google custom client

∥☆過路亽.° 提交于 2019-11-28 22:56:42
问题 I'm having an issue implementing custom OAuth2Client for google using DotNetOpenAuth and MVC4. I've got to the point where I can successfully make the authorization request to the google endpoint https://accounts.google.com/o/oauth2/auth and Google asks if the user will allow my application access to their account. All good so far. When the user clicks 'OK', google then calls my callback URL as expected. The problem is when I call the VerifyAuthentication method on the OAuthWebSecurity class

How do I use OAuth to connect to the Etrade API?

流过昼夜 提交于 2019-11-28 21:09:42
问题 E-Trade released their API recently and provided technical documentation which is somewhat useful but not complete. Does anyone have a fully working example in C# that shows how this works? I have been able to do the authentication using OAuth correctly, but when it comes to getting information out of my account or market data, the servers fail. 回答1: I was able to connect using the DevDefined OAuth Library, but i had to make some tweeks to the source to get it to work properly. I forked the

Should I use the built-in membership provider for an ASP .NET MVC application?

蹲街弑〆低调 提交于 2019-11-28 19:17:56
问题 I've been using a custom membership provider for authentication in all my web form applications till now. I'm about to start developing my first website using MVC. I'm wondering if I should I use the built-in membership provider that ships with ASP .NET MVC, or if I should create my own. My site needs to integrate with openid, facebook, google etc for authentication and openauth for api access. I'm wondering how easy it would be to use the built-in one for my needs. 回答1: Personally, I hate

How to use OpenID providers with unique identifier URLs in ASP.NET MVC4

北战南征 提交于 2019-11-28 18:57:28
The new SimpleMembershipProvider implemented in ASP.NET MVC4 allows easy, built-in support for two popular OpenID providers (Google and Yahoo) and three OAuth providers (Microsoft, Facebook, Twitter). The providers implemented in DotNetOpenAuth.AspNet.Clients for use with the SimpleMembershipProvider all use static URLs for their identity services --- that is, all users use the same well-known URL to access the provider. The users' OpenID identifiers are separate from the URL used to access the identity service. For example, Google's OpenID service URL is https://www.google.com/accounts/o8/id

Changed domain error - OpenId auth request contains an unregistered domain

Deadly 提交于 2019-11-28 18:16:12
I set up a project on my main domain example.com and then moved it to a subdomain sub.example.com Now when I try to use the same (default ASP.NET MVC or on my Discourse forum) project with OpenId and click on the Google button to log in with my Google account it throws the following error - That’s an error. OpenID auth request contains an unregistered domain: http://sub.example.com I have tried Googling that message but apparently I am one of the first four people to see it. Any ideas here? Altryne According to this page , Google closed registration to new OpenID 2.0 clients in May 2014 and

How to get error message returned by DotNetOpenAuth.OAuth2 on client side?

核能气质少年 提交于 2019-11-28 17:34:47
I'm using ExchangeUserCredentialForToken function to get the token from the Authorization server. It's working fine when my user exists in my databas, but when the credentials are incorect I would like to send back a message to the client. I'm using the following 2 lines of code to set the error message: context.SetError("Autorization Error", "The username or password is incorrect!"); context.Rejected(); But on the client side I'm getting only protocol error (error 400). Can you help me how can I get the error message set on the server side on the authorization server? The full app config from

Require Google to return email address as part of OAuth

送分小仙女□ 提交于 2019-11-28 16:43:02
I am using OAuth to access Gmail with dotNetOAuth. How can I force Google to return user's email address as part of callback after authorization? By default, Google OAuth callback only returns the token secret and access tokens. OAuth doesn't provide a facility for extra parameters during an OAuth handshake, so I don't think you can force Google to supply it. There is likely a Google API however that you can use your OAuth access token to call to fetch the email address after the handshake, however. mergoc First you need to add the following scope ( https://www.googleapis.com/auth/userinfo