dotnetopenauth

Does DotNetOpenAuth support Windows Phone projects?

妖精的绣舞 提交于 2019-12-24 08:29:58
问题 I get this error: Could not install package 'DotNetOpenAuth.Core 4.1.0.12182'. You are trying to install this package into a project that target s 'Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package does not contain any assembly references that are compatible with that fram ework. For more information, contact the package author. I know what the error message says, but it makes no sence - only if this aint suppose to work on Windows Phone at all. I've tried with a WP7 7.0

How do i extract data from an DotNetOpenID AX attribute?

*爱你&永不变心* 提交于 2019-12-24 07:58:44
问题 Andrew Arnott has a post here about how to extract the attribute exchange extension data, from an OpenId proivder. Here's a snippet of the code :- var fetch = openid.Response.GetExtension<FetchResponse>(); if (fetch != null) { IList<string> emailAddresses = fetch.GetAttribute (WellKnownAttributes.Contact.Email).Values; IList<string> fullNames = fetch.GetAttribute (WellKnownAttributes.Name.FullName).Values; string email = emailAddresses.Count > 0 ? emailAddresses[0] : null; string fullName =

Session change in between Request and Process user authorization

旧城冷巷雨未停 提交于 2019-12-24 05:49:31
问题 I am trying to implement a simple login page that redirects a user to an OAuth2.0 login server, and then back to a callback URL after they have successfully logged in. However I keep on getting exception with error message: Unexpected OAuth authorization response received with callback and client state that does not match an expected value. From debugging I noticed that the session id from before calling "RequestUserAuthorization()" and after are different. I read from some SO answers that I

DotNetOpenAuth Failing to work on Live Server

谁都会走 提交于 2019-12-23 05:26:21
问题 I worked on a sample application integrating OpenID into ASP.NET Web Forms. It works fine when hosted locally on my machine. However, when I uploaded the application to a live server, it started giving "Login Failed". You can try a sample here: http://samples.bhaidar.net/openidsso Any ideas? Here is the source code that fails to process the OpenID response: private void HandleOpenIdProviderResponse() { // Define a new instance of OpenIdRelyingParty class using (var openid = new

Secure Web Api called by PhoneGap application

柔情痞子 提交于 2019-12-23 03:53:26
问题 I'm implementing some WebApi to upload/convert/return videos. Another developer will implement a PhoneGap application that will call my WebApi to upload/convert/show videos to users. The PhoneGap application uses OpenId to allow users to login using google and facebook. My problem is that I want to make sure the client that is calling my WebApi has been logged in on the PhoneGap app using google or facebook. I know that all I need is the client to send me a token in the request header that I

How to use FavoriteFlavor attribute in DotNetOpenAuth Attribute Exchange

為{幸葍}努か 提交于 2019-12-23 03:44:09
问题 This code shows how to use Attribute Exchange with DotNetOpenAuth. But what if I have my own closed Provider and want to use custom attributes, for example the FavoriteFlavor attribute defined in the AcmeRequest as part of the DNOA samples; what do I have to do with DNOA to make the request look like something like (but for my FavoriteFlavor request): openid.ns.ax=http://openid.net/srv/ax/1.0 openid.ax.mode=fetch_request openid.ax.required=name,hackergotchi openid.ax.if_available=email,web

Specify request parameters in dotnetopenauth 4

霸气de小男生 提交于 2019-12-23 02:52:06
问题 I need to get Facebook display a "Log in to Facebook" prompt rather than a "Go to App" action when performing OAuth. In order to do this, I need to specify "display=popup" as part of the request. How can I do this when performing OAuth with DotNetOpenAuth 4 using their WebServerClient object? It seems in previous versions there was a requestParameters parameter in PrepareRequestUserAuthorization but now it just takes an IEnumerable listing scopes. Thanks 回答1: Add the display=popup query

Reporting and Logging errors while using DotnetopenAuth

戏子无情 提交于 2019-12-22 11:19:32
问题 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

DotNetOpenAuth and Google OpenID implementation

谁说我不能喝 提交于 2019-12-22 08:17:55
问题 It's a relatively well-known fact that Googles' OpenID Provider does not provide (no pun) username and various other properties, as well as that it generates really ugly claimed identifiers. However, in a recent Hanselminutes episode (at arount 21 minutes into the show) Andrew Arnott says that "Google has special requirements before they'll actually give a name and an email address". What are these requirements and how can one satisfy Google enough to make it actually return username and

Authentication to FreshBooks via DotNetOpenAuth

99封情书 提交于 2019-12-22 05:52:34
问题 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