Create Security namespace

This commit is contained in:
Cyberboss
2018-04-11 14:26:57 -04:00
parent 6c7b54018b
commit 0237f78a5a
12 changed files with 15 additions and 13 deletions
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Builder;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host
{
/// <summary>
/// Extension methods for <see cref="IApplicationBuilder"/>
@@ -9,6 +9,7 @@ using System;
using System.Globalization;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Core
{
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Http;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host
{
/// <summary>
/// Extension methods for <see cref="HttpContext"/>
@@ -12,6 +13,6 @@ namespace Tgstation.Server.Host.Core
/// </summary>
/// <param name="httpContext">The <see cref="HttpContext"/> containing the <see cref="IAuthenticationContext"/></param>
/// <returns>The <see cref="IAuthenticationContext"/> associated with the <see cref="HttpContext"/></returns>
public static IAuthenticationContext AuthenticationContext(this HttpContext httpContext) => Core.AuthenticationContext.Current(httpContext);
public static IAuthenticationContext AuthenticationContext(this HttpContext httpContext) => Security.AuthenticationContext.Current(httpContext);
}
}
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Models
{
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Models
{
@@ -9,7 +9,7 @@ using Tgstation.Server.Api;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// Manages <see cref="Api.Models.User"/>s for a scope
@@ -4,7 +4,7 @@ using System.Security.Cryptography;
using System.Text;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <inheritdoc />
sealed class CryptographySuite : ICryptographySuite
@@ -3,7 +3,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// Represents the currently authenticated <see cref="Api.Models.User"/>
@@ -1,6 +1,6 @@
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// Contains various cryptographic functions
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// Represents a user on the current <see cref="System.Runtime.InteropServices.OSPlatform"/>
@@ -1,6 +1,6 @@
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// Factory for <see cref="ISystemIdentity"/>s
@@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Security
{
/// <summary>
/// For creating and decoding JWTs