* 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
29 lines
899 B
C#
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
|
|
});
|
|
}
|
|
}
|
|
} |