Added comments

This commit is contained in:
Maxime Roussin-Bélanger
2015-03-28 16:02:11 -04:00
parent 4bda111678
commit fdd5ab6b1b
4 changed files with 15 additions and 4 deletions

View File

@@ -3,8 +3,17 @@ using System;
namespace Owin.Security.Providers.Wargaming
{
/// <summary>
/// Extension methods for using <see cref="WargamingAuthenticationMiddleware"/>
/// </summary>
public static class WargamingAccountAuthenticationExtensions
{
/// <summary>
/// Authenticate users using Wargaming
/// </summary>
/// <param name="app">The <see cref="IAppBuilder"/> passed to the configuration method</param>
/// <param name="options">Middleware configuration options</param>
/// <returns>The updated <see cref="IAppBuilder"/></returns>
public static IAppBuilder UseWargamingAccountAuthentication(this IAppBuilder app, WargamingAuthenticationOptions options)
{
if (app == null)

View File

@@ -5,14 +5,11 @@ using System.Collections.Generic;
using System.Net.Http;
using System.Security.Claims;
using System.Text.RegularExpressions;
using Newtonsoft.Json.Converters;
using System.Data;
namespace Owin.Security.Providers.Wargaming
{
internal sealed class WargamingAuthenticationHandler : OpenIDAuthenticationHandlerBase<WargamingAuthenticationOptions>
{
private readonly Regex AccountIDRegex = new Regex(@"^https://na.wargaming.net/id/([0-9]{10}).*$", RegexOptions.Compiled);
private const string UserInfoUri = "https://api.worldoftanks.com/wot/account/info/?application_id={0}&account_id={1}&fields=nickname";

View File

@@ -11,6 +11,9 @@ using Owin.Security.Providers.OpenID;
namespace Owin.Security.Providers.Wargaming
{
/// <summary>
/// OWIN middleware for authenticating users using an OpenID provider
/// </summary>
public class WargamingAuthenticationMiddleware : OpenIDAuthenticationMiddlewareBase<WargamingAuthenticationOptions>
{

View File

@@ -10,7 +10,9 @@ namespace Owin.Security.Providers.Wargaming
{
public class WargamingAuthenticationOptions : OpenIDAuthenticationOptions
{
/// <summary>
/// Region to use for to log in
/// </summary>
public enum Region
{
Europe,