Skip to content

Commit

Permalink
namespace changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy committed Dec 15, 2019
1 parent 648b9e2 commit 02b6178
Show file tree
Hide file tree
Showing 37 changed files with 56 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using Microsoft.Azure.Management.AppService.Fluent.Models;
using Microsoft.Azure.Management.Fluent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FluffySpoon.AspNet.LetsEncrypt.Azure;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using FluffySpoon.LetsEncrypt.Azure;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
using System.IO;
using System.Linq;
using Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using FluffySpoon.AspNet.LetsEncrypt.EntityFramework;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Text;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
Expand Down
3 changes: 2 additions & 1 deletion src/FluffySpoon.AspNet.LetsEncrypt.Sample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;

Expand Down
1 change: 1 addition & 0 deletions src/FluffySpoon.AspNet.LetsEncrypt.Sample/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Certes;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
using System.Collections.Generic;
using FluentAssertions;
using FluentAssertions.Extensions;
using FluffySpoon.AspNet.LetsEncrypt.Logic;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Certificates;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
using Certes.Acme;
using FluentAssertions;
using FluentAssertions.Extensions;
using FluffySpoon.AspNet.LetsEncrypt.Logic;
using FluffySpoon.AspNet.LetsEncrypt.Logic.Models;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Certificates;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NSubstitute;
using static FluffySpoon.AspNet.LetsEncrypt.Logic.Models.CertificateRenewalStatus;
using static FluffySpoon.AspNet.LetsEncrypt.Certificates.CertificateRenewalStatus;

namespace FluffySpoon.AspNet.LetsEncrypt.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Certes;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
Expand Down
2 changes: 2 additions & 0 deletions src/FluffySpoon.AspNet.LetsEncrypt.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue">DO_NOT_SHOW</s:String></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public interface ILetsEncryptChallengeApprovalMiddleware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;

namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public interface ILetsEncryptRenewalService: IHostedService, IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;

namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public class LetsEncryptChallengeApprovalMiddleware : ILetsEncryptChallengeApprovalMiddleware
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
using Certes.Acme;
using Certes.Acme.Resource;
using FluffySpoon.AspNet.LetsEncrypt.Exceptions;
using FluffySpoon.AspNet.LetsEncrypt.Logic.Models;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using Microsoft.Extensions.Logging;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public interface ILetsEncryptClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using Microsoft.Extensions.Logging;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public interface ILetsEncryptClientFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Certes;
using Certes.Acme;

namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public class LetsEncryptOptions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Logic;
using FluffySpoon.AspNet.LetsEncrypt.Certificates;
using Microsoft.Extensions.Logging;
using static FluffySpoon.AspNet.LetsEncrypt.Logic.Models.CertificateRenewalStatus;
using static FluffySpoon.AspNet.LetsEncrypt.Certificates.CertificateRenewalStatus;

namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public class LetsEncryptRenewalService : ILetsEncryptRenewalService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FluffySpoon.AspNet.LetsEncrypt.Logic.Models
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public class PfxCertificate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Certes.Acme;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic.Models
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
public class PlacedOrder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FluffySpoon.AspNet.LetsEncrypt
namespace FluffySpoon.AspNet.LetsEncrypt.Certes
{
/// <summary>
/// Defines the ways errors are handle by the <see cref="ILetsEncryptRenewalService" />.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Logic.Models;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence;
using Microsoft.Extensions.Logging;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic
namespace FluffySpoon.AspNet.LetsEncrypt.Certificates
{
public interface ICertificateProvider
{
Task<CertificateRenewalResult> RenewCertificateIfNeeded(X509Certificate2 current = null);
}


public class CertificateProvider : ICertificateProvider
{
private readonly IPersistenceService _persistenceService;
private readonly ILetsEncryptClientFactory _clientFactory;
private readonly ICertificateValidator _certificateValidator;

private readonly ILogger<CertificateProvider> _logger;

private readonly string[] _domains;

public CertificateProvider(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Security.Cryptography.X509Certificates;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic.Models
namespace FluffySpoon.AspNet.LetsEncrypt.Certificates
{
public class CertificateRenewalResult
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FluffySpoon.AspNet.LetsEncrypt.Logic.Models
namespace FluffySpoon.AspNet.LetsEncrypt.Certificates
{
public enum CertificateRenewalStatus
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using Microsoft.Extensions.Logging;

namespace FluffySpoon.AspNet.LetsEncrypt.Logic
namespace FluffySpoon.AspNet.LetsEncrypt.Certificates
{
public interface ICertificateValidator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;

namespace FluffySpoon.AspNet.LetsEncrypt.Certificates
{
public interface ICertificateProvider
{
Task<CertificateRenewalResult> RenewCertificateIfNeeded(X509Certificate2 current = null);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FluffySpoon.AspNet.LetsEncrypt.Persistence.Models
namespace FluffySpoon.AspNet.LetsEncrypt.Persistence
{
public class ChallengeDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;

namespace FluffySpoon.AspNet.LetsEncrypt.Persistence
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace FluffySpoon.AspNet.LetsEncrypt.Persistence
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;

namespace FluffySpoon.AspNet.LetsEncrypt.Persistence
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Certes;
using FluffySpoon.AspNet.LetsEncrypt.Persistence.Models;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

Expand Down
3 changes: 2 additions & 1 deletion src/FluffySpoon.AspNet.LetsEncrypt/RegistrationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using FluffySpoon.AspNet.LetsEncrypt.Logic;
using FluffySpoon.AspNet.LetsEncrypt.Certes;
using FluffySpoon.AspNet.LetsEncrypt.Certificates;

namespace FluffySpoon.AspNet.LetsEncrypt
{
Expand Down

0 comments on commit 02b6178

Please sign in to comment.