Files
OwinOAuthProviders/Owin.Security.Providers/LinkedIn/LinkedInAuthenticationExtensions.cs
2013-11-13 10:43:51 +07:00

29 lines
902 B
C#

using System;
namespace Owin.Security.Providers.LinkedIn
{
public static class LinkedInAuthenticationExtensions
{
public static IAppBuilder UseLinkedInAuthentication(this IAppBuilder app,
LinkedInAuthenticationOptions options)
{
if (app == null)
throw new ArgumentNullException("app");
if (options == null)
throw new ArgumentNullException("options");
app.Use(typeof(LinkedInAuthenticationMiddleware), app, options);
return app;
}
public static IAppBuilder UseLinkedInAuthentication(this IAppBuilder app, string clientId, string clientSecret)
{
return app.UseLinkedInAuthentication(new LinkedInAuthenticationOptions
{
ClientId = clientId,
ClientSecret = clientSecret
});
}
}
}