dotnetopenauth

Google+ API: How can I use RefreshTokens to avoid requesting access every time my app launches?

99封情书 提交于 2019-11-27 10:53:22
I'm trying to use the Google+ API to access info for the authenticated user. I've copied some code from one of the samples, which works fine (below), however I'm having trouble making it work in a way I can reuse the token across app-launches. I tried capturing the "RefreshToken" property and using provider.RefreshToken() (amongst other things) and always get a 400 Bad Request response. Does anyone know how to make this work, or know where I can find some samples? The Google Code site doesn't seem to cover this :-( class Program { private const string Scope = "https://www.googleapis.com/auth

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

断了今生、忘了曾经 提交于 2019-11-27 10:49:52
问题 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

Where can I find a list of OpenID Provider URLs?

若如初见. 提交于 2019-11-27 10:01:03
I've implemented OpenID on my website but I'm having a hard time finding a list of OpenID Provider URLs. I thought this would be easy to find but I've scoured the web and only found a handful, mostly by accident. Is there a resource that lists available Providers and their authentication URLs? EDIT: Here are the ones I've found so far. I haven't tried all of them so let me know if any of them are wrong. StackExchange https://openid.stackexchange.com Google https://www.google.com/accounts/o8/id - deprecated May 2014 - shutting down Apr 2015 Yahoo https://me.yahoo.com Flickr http://www.flickr

Require Google to return email address as part of OAuth

纵饮孤独 提交于 2019-11-27 09:52:03
问题 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. 回答1: 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

Request for Tutorial to add Openid Support to NerdDinner ASP.NET MVC application

时光怂恿深爱的人放手 提交于 2019-11-27 09:18:09
问题 I'm looking learn about ASP.NET MVC and OpenId using the ASP.NET MVC NerdDinner tutorial. I would like to replace the Authentication system in NerdDinner to be OpenId only. I've downloaded the latest DotNetOpenAuth libraries but I'm not sure how to put it all together. Can anyone help with a quick step-by-step tutorial? Is this as simple as dropping in the library or are there significant changes needed to the application as well? 回答1: Once you download dotnetopenid, look in the samples

OpenID authentication in ASP.NET?

£可爱£侵袭症+ 提交于 2019-11-27 09:11:25
问题 I am starting to build a new web application that will require user accounts. Now that I have an OpenID that I am using for this site I thought it would be cool if I could use OpenID for authentication in my application. Are there any good tutorials on how to integrate OpenID with an ASP.NET site? 回答1: See Scott Hanselman's post on using DotNetOpenID in ASP.NET. Andrew Arnott's blog is full of samples on using DotNetOpenID with ASP.NET, including ASP.NET MVC. I recently hooked up DotNetOpenID

How do I use a Service Account to Access the Google Analytics API V3 with .NET C#?

风流意气都作罢 提交于 2019-11-27 07:08:07
I realized this question has been previously asked but with little in the way of example code, so I am asking again but with at least a little bit of direction. After hours of searching, I have come up with the following partial implementation. namespace GoogleAnalyticsAPITest.Console { using System.Security.Cryptography.X509Certificates; using DotNetOpenAuth.OAuth2; using Google.Apis.Analytics.v3; using Google.Apis.Analytics.v3.Data; using Google.Apis.Authentication.OAuth2; using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; class Program { static void Main(string[] args) { log4net.Config

OpenID: Trying to Get Email Address from Google OP

女生的网名这么多〃 提交于 2019-11-27 06:20:57
I’m using dotnetopenauth 3.2 to implement Openid and can’t figure out how to get Google to pass the email address in the Claims Response. I know that Google doesn’t support simple registration, but I can’t determine what they do support. Caveat to this question is that I just started learning OpenID and I know I don’t have a solid grasp on the specification which I think is leading to my confusion. Any help would be appreciated! Zaffiro Ok figured it out. I posted a question on Goolge's Federated Log API group and was told to use Attribute exchange . Below is the code for DotNetOpenAuth .

Migrating Google OpenID to OpenID Connect: openid_id does not match

无人久伴 提交于 2019-11-27 03:33:37
问题 I have begun the process of Migrating from Google OpenID to the OpenID Connect with OAuth 2.0 following what is presented in the Documentation. I am able successfully complete the workflow of retrieving the openid_id and sub inside the id_token from the token endpoint, but when I do, the openid_id does not match the existing identifier we have in our system. Preventing me from mapping the existing user to the new ID and preventing the user from logging into our application (or possibly being

Securing my REST API with OAuth while still allowing authentication via third party OAuth providers (using DotNetOpenAuth)

笑着哭i 提交于 2019-11-27 02:28:58
I have a product with a straightforward REST API so that users of the product can directly integrate with the product's features without using my web user interface. Recently I have been getting interest from various third parties about integrating their desktop clients with the API to allow users of my product to access their data using that third party application. I've seen that applications that want to use Twitter authenticate using a login page hosted by Twitter that grants a specific application permission to access that user's data. You click the "Allow" or "Deny" button and the