dotnetopenauth

DotNetOpenAuth OAuth 2.0 authorization with Google

懵懂的女人 提交于 2019-12-06 04:43:19
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.Messaging.Channel - Preparing to send AccessTokenAuthorizationCodeRequestC (2.0) message. 2014-03-27 12:20

DotNetOpenAuth Google OAuth2

不打扰是莪最后的温柔 提交于 2019-12-06 03:39:36
In the last DotNetOpenAuth package, GoogleClient extends OpenIdClient, Someone knows where can i find implementation of google Oauth2 which extends DotNetOpenAuth OAuth2Client? Alexey Gukezhev From OAuth2 and DotNetOpenAuth - implementing Google custom client public class GoogleOAuth2Client : OAuth2Client { #region Constants and Fields /// <summary> /// The authorization endpoint. /// </summary> private const string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth"; /// <summary> /// The token endpoint. /// </summary> private const string TokenEndpoint = "https://accounts

Error message from DotNetOpenAuth's ReadAuthorizationRequest when passing in HttpRequestWrapper

孤街醉人 提交于 2019-12-06 03:23:24
I have a custom authorization filter for my Authorize method in my OAuth controller. When the authorization filter notes the user is logged, it stuffs the current OAuth request into the session, and ships them off to log in. After log in, in my /OAuth/Authorize endpoint, I check to see if that request is in the session, instead of immediately failing because there is not an authorization request attached to the current request. Then, I call the authorization server with that request object. The code in my Authorize action looks like this: [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]

jquery mobile canceling 302 redirect to external site

别来无恙 提交于 2019-12-06 02:23:44
问题 I'm trying to integrate DotNetOpenAuth with a site that uses jquery mobile. I'm running into an issue where jquery mobile appears to be canceling a 302 redirect to the providing party (an external site) that the server is responding with. I've tried turning off the default jquery mobile ajax handling with the following in the mobileinit event: $.mobile.ajaxEnabled = false; If I take jquery mobile out of the picture the 302 redirect is handled correctly and the OpenID integration with the

ActionResult redirect renders using ToString()

拥有回忆 提交于 2019-12-05 23:50:22
Using the following sample: http://www.west-wind.com/Weblog/posts/899303.aspx The following line... return req.RedirectingResponse.AsActionResult(); renders the string "DotNetOpenAuth.Messaging.OutgoingWebResponseActionResult". This is the class being returned as ActionResult in the line as posted. Does anyone know why I get the class name as string instead of a actual redirect? Thnx in advance! Could it be that you have multiple versions of MVC in your Bin directory and your web server? It strikes me that if you had multiple assemblies (different versions) of the MVC types like ActionResult

Reporting and Logging errors while using DotnetopenAuth

萝らか妹 提交于 2019-12-05 18:39:18
Wanted to connect with the Withings API. I used the same Controller in an other project, where he worked perfectly. In a project where the site is an Azure webrole(don't know how that is the issue) it just doesn't work. First I got The type initializer for 'DotNetOpenAuth.Reporting' threw an exception. So I turned it off in the web.config reporting enabled="false" Now I got The type initializer for 'DotNetOpenAuth.Logger' threw an exception. I don't use log4net. public ActionResult StartOAuth() { var serviceProvider = GetServiceDescription(); var consumer = new WebConsumer(serviceProvider,

Two legged OAuth using DotNetOpenAuth

徘徊边缘 提交于 2019-12-05 17:14:12
I have read up on two legged OAuth and understand the principals behind it - my question is specific to the DotNetOpenAuth library. Is there sample code or supporting documentation on how to use DotNetOpenAuth via two legged authentication? Three legged appears to be supported quite well and since two legged is simply a reduction in the number of steps I would assume this would be easy - so far, this isn't the case. No, there's no samples of 2-legged OAuth with DotNetOpenAuth. If you're running into issues with doing it by just removing one leg from the existing samples, please describe the

Authentication to FreshBooks via DotNetOpenAuth

∥☆過路亽.° 提交于 2019-12-05 09:53:08
I'm trying to use OAuth for authentication for the FreshBooks API from my ASP.NET MVC C# app. Here is what I have so far: I'm using DotNetOpenAuth here is the code I have in my controller action if (TokenManager != null) { ServiceProviderDescription provider = new ServiceProviderDescription(); provider.ProtocolVersion = ProtocolVersion.V10a; provider.AccessTokenEndpoint = new MessageReceivingEndpoint ("https://myfbid.freshbooks.com/oauth/oauth_access.php", DotNetOpenAuth.Messaging.HttpDeliveryMethods.PostRequest); provider.RequestTokenEndpoint = new DotNetOpenAuth.Messaging

DotNetOpenAuth vs Owin OAuth

泪湿孤枕 提交于 2019-12-05 08:21:34
I am new the webAPI2, so please excuse me if my question is trivial. I want to implement token based security for my webAPI, so that other applications (apart from my SPA) can also call my webAPIs. I started with Owin OpenAuth and implemented a POC. Everything worked well. But when I had to send client to Authorization to Authorization server, I could not find any inbuilt function to do that. I had to build this my self. Then I came across DotNetOpenAuth that provides APIs to set the communication as well. As far as I could find out, Microsoft is favoring Owin OpenAuth over DotNetOpenAuth. Can

claimsResponse Return Null

非 Y 不嫁゛ 提交于 2019-12-05 07:14:12
hello i have a following code in asp.net. i have used DotNetOpenAuth.dll for openID. the code is under protected void openidValidator_ServerValidate(object source, ServerValidateEventArgs args) { // This catches common typos that result in an invalid OpenID Identifier. args.IsValid = Identifier.IsValid(args.Value); } protected void loginButton_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; // don't login if custom validation failed. } try { using (OpenIdRelyingParty openid = this.createRelyingParty()) { IAuthenticationRequest request = openid.CreateRequest(this.openIdBox