* Added the podbean auth provider. * Updated Readme to include podbean * Fixed Owin nuget reference * Removed regions from around using statements, corrected the VS version in the solution file and changed the Startup.Auth in the demo project to use spaces instead of tabs. * Added the OAuth refresh token to the PodbeanAuthenticatedContext.
33 lines
909 B
C#
33 lines
909 B
C#
#region
|
|
|
|
using System;
|
|
|
|
#endregion
|
|
|
|
namespace Owin.Security.Providers.Podbean
|
|
{
|
|
public static class PodbeanAuthenticationExtensions
|
|
{
|
|
public static IAppBuilder UsePodbeanAuthentication(this IAppBuilder app,
|
|
PodbeanAuthenticationOptions options)
|
|
{
|
|
if (app == null)
|
|
throw new ArgumentNullException(nameof(app));
|
|
if (options == null)
|
|
throw new ArgumentNullException(nameof(options));
|
|
|
|
app.Use(typeof(PodbeanAuthenticationMiddleware), app, options);
|
|
|
|
return app;
|
|
}
|
|
|
|
public static IAppBuilder UsePodbeanAuthentication(this IAppBuilder app, string appId, string appSecret)
|
|
{
|
|
return app.UsePodbeanAuthentication(new PodbeanAuthenticationOptions
|
|
{
|
|
AppId = appId,
|
|
AppSecret = appSecret
|
|
});
|
|
}
|
|
}
|
|
} |