Files
OwinOAuthProviders/Owin.Security.Providers/BattleNet/BattleNetAuthenticationExtensions.cs
Kristoffer Pettersson 2fa48716cf - Added authentication against Battle.net
I have added functionality for authenticating against Battle.net OAuth
2014-11-12 20:30:19 +01:00

29 lines
735 B
C#

using System;
namespace Owin.Security.Providers.BattleNet
{
public static class BattleNetAuthenticationExtensions
{
public static IAppBuilder UseBattleNetAuthentication(this IAppBuilder app, BattleNetAuthenticationOptions options)
{
if (app == null)
throw new ArgumentException("app");
if (options == null)
throw new ArgumentException("options");
app.Use(typeof(BattleNetAuthenticationMiddleware), app, options);
return app;
}
public static IAppBuilder UseBattleNetAuthentication(this IAppBuilder app, string clientId, string clientSecret)
{
return app.UseBattleNetAuthentication(new BattleNetAuthenticationOptions
{
ClientId = clientId,
ClientSecret = clientSecret
});
}
}
}