dotnetopenauth

How to use OAuth 2 - OAuth 2 C# example

↘锁芯ラ 提交于 2019-12-06 20:12:51
问题 I have to figure out how to use OAuth 2 in order to use Deviantart api. I got the client_id and client_secret part Here the information they give Endpoints The only information you need to authenticate with us using OAuth 2.0 are the client_id and client_secret values for your app, as well as the endpoint shown below. OAuth 2.0 draft 10: https://www.deviantart.com/oauth2/draft10/authorize https://www.deviantart.com/oauth2/draft10/token OAuth 2.0 draft 15: https://www.deviantart.com/oauth2

TypeLoadException from Logger.Create when running DotNetOpenAuth under mono

六眼飞鱼酱① 提交于 2019-12-06 16:52:43
问题 I'm following a simple tutorial on DotNetOpenAuth. It works fine when i run it in my localhost visual studio development machine. However, as soon as a I move it to a testing/staging server that is running mono it throws the following error: Location: Page_Load An exception was thrown by the type initializer for DotNetOpenAuth.Reporting InnerException: System.TypeInitializationException: An exception was thrown by the type initializer for DotNetOpenAuth.Logger ---> System.TypeLoadException: A

Secure Web Api called by PhoneGap application

天大地大妈咪最大 提交于 2019-12-06 16:36:24
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 can "extract" on the web api to validate the user. My question is how can my WebApi know what is the

DotNetOpenAuth OAuth 1.0a Consumer automation

若如初见. 提交于 2019-12-06 14:08:15
I've question regarding automation with oAuth 1.0a. I need to access a REST API at a oAuth provider on behalf of a user. The provider has oAuth version 1.0a implemented. At forehand excuse my ignorance on oAuth, it's new territory for me. I'm working on a .NET MVC 5 project and installed the NuGet Package as follows: "Install-Package DotNetOpenAuth.OAuth.Consumer". This installed the following: Attempting to gather dependencies information for package 'DotNetOpenAuth.OAuth.Consumer.4.3.4.13329' with respect to project ' projectname ', targeting '.NETFramework,Version=v4.6.1'... successfully

DotNetOpenAuth.Messaging - Protocol error: This message has a timestamp of {0}, which is beyond the allowable clock skew for in the future

ⅰ亾dé卋堺 提交于 2019-12-06 12:07:29
问题 I got a error from openid provider 2010-08-26 16:54:30,240 (GMT+4) [26] ERROR DotNetOpenAuth.Messaging - Protocol error: This message has a timestamp of 26.08.2010 16:54:37, which is beyond the allowable clock skew for in the future What is the reason of such error? Full log 2010-08-26 16:54:29,849 (GMT+4) [26] DEBUG DotNetOpenAuth.Messaging.Channel - Preparing to send CheckIdRequest (2.0) message. 2010-08-26 16:54:29,849 (GMT+4) [26] DEBUG DotNetOpenAuth.Messaging.Bindings - Binding element

Unit Test Url.Action

北慕城南 提交于 2019-12-06 08:10:45
问题 I am trying to unit test the code I got from an DotNetOpenAuth example but I have a hard time getting the UrlHelper to work in my tests. Somewhere on the LogOn ActionResult on my controller it calls the following UrlHelper. The following example is a simplified version of that ActionResult. public ActionResult TestUrlHelper() { var test = Url.ActionFull("LogOnReturnTo"); return View(); } My test looks something like this: [Test] public void TestTest() { AccountController controller =

Value was either too large or too small for an Int32 - Facebook & dotnetopenauth

﹥>﹥吖頭↗ 提交于 2019-12-06 07:42:10
问题 I am trying to get a sample project to work with dotnetopenauth and facebook. I have this code namespace OAuthClient { using System; using System.Configuration; using System.Net; using System.Web; using DotNetOpenAuth.ApplicationBlock; using DotNetOpenAuth.ApplicationBlock.Facebook; using DotNetOpenAuth.OAuth2; public partial class Facebook : System.Web.UI.Page { private static readonly FacebookClient client = new FacebookClient { ClientIdentifier = ConfigurationManager.AppSettings[

Retrieve OpenId User Information (Claims) across providers

萝らか妹 提交于 2019-12-06 06:55:25
问题 I'm using DotNetOpenAuth to log in as part of my login process. It works great for handling authentication but the process of retrieving user information from various openId providers is not working very well. Using MyOpenId I do get full information that I request using a ClaimsRequest with DotNetOpenAuth. It apparently uses the SREG protocol to request and retrieve this content. This works great with MyOpenId, but doesn't do anything for Google or Yahoo and other providers that do not

Looking for samples of using DotNetOpenAuth with WebAPI [closed]

﹥>﹥吖頭↗ 提交于 2019-12-06 06:07:21
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm trying to secure my WebAPI project, and would like to use DotNotOpenAuth, but I'm unable to find any quality samples or tutorials.

Using DotNetOpenAuth OAuth 2 with Azure - Reading Certificate - difficulty extracting keys

大城市里の小女人 提交于 2019-12-06 05:56:15
问题 The DotNetOpenAuth OAuth 2 Library requires RSAParameters to access public and private keys (example in DotNetOpenAuth OAuth 2 - UriStyleMessageFormatter which uses RSAParameters to construct an RSACryptoServiceProvider). I came across an Azure Security Whitepaper which noted that Azure installs certificates in a "certificate store with a flag indicating that the private key can be used but not exported". Which I believe may be at the heart of this problem. While I have been able extract the