dotnetopenauth

Facebook Login works in localhost but not in webhost

非 Y 不嫁゛ 提交于 2019-12-11 00:39:12
问题 I have a class listed below: public class FacebookScopedClient : IAuthenticationClient { private string appId; private string appSecret; private string scope; private const string baseUrl = "https://www.facebook.com/dialog/oauth?client_id="; public const string graphApiToken = "https://graph.facebook.com/oauth/access_token?"; public const string graphApiMe = "https://graph.facebook.com/me?"; private string GetHTML(string URL) { string connectionString = URL; try { var myRequest =

DotNetOpenAuth OAuth2 Accessing Extra Data

亡梦爱人 提交于 2019-12-10 22:08:50
问题 I'm using DotNetOpenAuth's OAuth2 library to handle authorization with another third party system. It all works great, except that the third party system is returning the UserId="testname" in the Response with the AccessToken. I need that UserId because this third party API requires it as part of their API calls (ex: users/{userId}/account). Using DotNetOpenAuth, I don't have access to the AccessToken response so I can't get the UserId out. I'm calling: (_client is a WebServerClient) var

OAuth2 different client authentication methods

对着背影说爱祢 提交于 2019-12-10 18:18:27
问题 I have a web service that acts as a OAuth 1.0a provider. Web applications go through the OAuth 1 workflow to gain access to user resources. So far so good. The client web application has the need to communicate with the service for other needs, to exchange private data NOT linked to a particular user/resource owner. For that, a good idea seems to use OAuth2, in particular Client Credentials Grant (4.4)(which was designed exactly for this). From a "confidential client" (and a web application

How to use OpenID without asking user for his OpenID URL?

倖福魔咒の 提交于 2019-12-10 17:35:20
问题 I'm setting up an OpenID provider using DotNetOpenAuth and I'm stuck. It seems that OpenID requires that the user provides his OpenID URL first, and then the consumer would redirect him to the provider, giving the URL as a parameter (checkid_setup mode). But with google, and some other providers, it works differently. You are just redirected to a generic page where you would either sign in, or select one of the accounts you're already logged in with. Or just redirected back if you're logged

Login with gmail account through c# .net

戏子无情 提交于 2019-12-10 13:07:43
问题 i am using DotNetOpenID dll for logging my sample application through gmail authentication through c# .net code which i used was protected void Page_Load(object sender, EventArgs e) { OpenIdRelyingParty rp = new OpenIdRelyingParty(); var r = rp.GetResponse(); if (r != null) { switch (r.Status) { case AuthenticationStatus.Authenticated: NotLoggedIn.Visible = false; Session["GoogleIdentifier"] = r.ClaimedIdentifier.ToString(); Response.Redirect("About.aspx"); //redirect to main page of your

Using DotNetOpenAuth for NetSuite SuiteSignOn (Outbound Single Sign-on)

我与影子孤独终老i 提交于 2019-12-10 11:43:32
问题 I am trying to figure out how to use DotNetOpenAuth (DNOA) to interface to NetSuite's SuiteSignOn. I have a java example I am trying to duplicate the function of, but I am new to OAuth. Here is what I have to work with: This is the high level of what NetSuite wants to happen: User logs in to NetSuite, initiating a NetSuite session. User clicks on one of the following in the NetSuite user interface: o A subtab that provides SuiteSignOn access o A page displaying a portlet that provides

DotNetOpenAuth Google OAuth2

梦想的初衷 提交于 2019-12-10 10:23:19
问题 In the last DotNetOpenAuth package, GoogleClient extends OpenIdClient, Someone knows where can i find implementation of google Oauth2 which extends DotNetOpenAuth OAuth2Client? 回答1: 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> ///

Error message from DotNetOpenAuth's ReadAuthorizationRequest when passing in HttpRequestWrapper

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 09:54:46
问题 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.

DotNetOpenAuth and Facebook

痴心易碎 提交于 2019-12-10 02:22:41
问题 I'm attempting to use DotNetOpenAuth for some web single sign on functionality. I got the samples working for Google and Yahoo but am struggling with Facebook. I am using the CTP (4.0.0.11165) and have followed the example in this SO question. However, I get a runtime error on the line: IAuthorizationState authorization = client.ProcessUserAuthorization(); The error is: Failed to obtain access token. Authorization Server reports reason: (unknown) Any ideas? 回答1: The build you're using is

Expectation Failed when trying to update twitter status

∥☆過路亽.° 提交于 2019-12-09 03:56:07
问题 I can't seem to figure this one out. No matter what I do, I keep getting a "417 Expectation failed" error. Everywhere I've looked says that I need to get rid of the Expect header for the HttpWebRequest. Setting the static property ServicePointManager.Expect100Continue = false or the instance property on the web request request.ServicePoint.Expect100Continue = false never get's rid of the header. I have to manually set it to null to remove it. No matter what though, I STILL get the 417 error.