Files
OwinOAuthProviders/Owin.Security.Providers/Foursquare/FoursquareAuthenticationExtensions.cs
2015-03-18 21:40:48 +00:00

31 lines
945 B
C#

using System;
namespace Owin.Security.Providers.Foursquare
{
public static class FoursquareAuthenticationExtensions
{
public static IAppBuilder UseFoursquareAuthentication(this IAppBuilder app, FoursquareAuthenticationOptions options)
{
if (app == null)
{
throw new ArgumentNullException("app");
}
if (options == null)
{
throw new ArgumentNullException("options");
}
return app.Use(typeof(FoursquareAuthenticationMiddleware), app, options);
}
public static IAppBuilder UseFoursquareAuthentication(this IAppBuilder app, string clientId, string clientSecret)
{
return app.UseFoursquareAuthentication(new FoursquareAuthenticationOptions
{
ClientId = clientId,
ClientSecret = clientSecret
});
}
}
}