Files
OwinOAuthProviders/src/Owin.Security.Providers.Evernote/EvernoteAuthenticationExtensions.cs
Guillaume 5626c02442 Added provider for Evernote (#197)
* Evernote provider is now available.
Based on Evernote SDK for .NET and the obsolete doc (ie. https://dev.evernote.com/doc/articles/authentication.php) (Step 3 is POST, not GET)

* Fix SyncrhonizationContext deadlock caused by ASP.NET site

* Evernote provider now working trought Xamarin OAuthAuthenticator and Identity Server 3

* Add claims for notestoreuri and accesstoken

* Evernote OK, before cleanup

* Cleanup

* Remove my credentials in demo project.

* Change the default URL to lower case
2017-03-04 20:30:56 -05:00

29 lines
899 B
C#

using System;
namespace Owin.Security.Providers.Evernote
{
public static class EvernoteAuthenticationExtensions
{
public static IAppBuilder UseEvernoteAuthentication(this IAppBuilder app,
EvernoteAuthenticationOptions options)
{
if (app == null)
throw new ArgumentNullException(nameof(app));
if (options == null)
throw new ArgumentNullException(nameof(options));
app.Use(typeof(EvernoteAuthenticationMiddleware), app, options);
return app;
}
public static IAppBuilder UseEvernoteAuthentication(this IAppBuilder app, string appKey, string appSecret)
{
return app.UseEvernoteAuthentication(new EvernoteAuthenticationOptions
{
AppKey = appKey,
AppSecret = appSecret
});
}
}
}