Skip to content

Commit

Permalink
Namespace changes (added Contrib)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgekosmidis committed Mar 1, 2020
1 parent ed95ed9 commit 04a58cc
Show file tree
Hide file tree
Showing 65 changed files with 1,736 additions and 409 deletions.
Expand Up @@ -3,15 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29503.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService", "src\IdentityServer4.HttpClientService\IdentityServer4.HttpClientService.csproj", "{05D7258E-58E4-4847-B62D-D36F9F61C8DA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService", "src\IdentityServer4.Contrib.HttpClientService\IdentityServer4.Contrib.HttpClientService.csproj", "{05D7258E-58E4-4847-B62D-D36F9F61C8DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService.Tests", "test\IdentityServer4.HttpClientService.Tests\IdentityServer4.HttpClientService.Tests.csproj", "{18F0538F-33F7-40E4-AE11-833D73A9D22C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService.Tests", "test\IdentityServer4.Contrib.HttpClientService.Tests\IdentityServer4.Contrib.HttpClientService.Tests.csproj", "{18F0538F-33F7-40E4-AE11-833D73A9D22C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService.IntegrationTestsProject", "test\IdentityServer4.HttpClientService.IntegrationTestsProject\IdentityServer4.HttpClientService.IntegrationTestsProject.csproj", "{0A5EEF98-8AD5-4759-9138-96D71C04CFE8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject", "test\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject.csproj", "{0A5EEF98-8AD5-4759-9138-96D71C04CFE8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService.IntegrationTestsProject.Tests", "test\IdentityServer4.HttpClientService.IntegrationTestsProject.Tests\IdentityServer4.HttpClientService.IntegrationTestsProject.Tests.csproj", "{1B39FD57-82E7-48B9-B348-AD5FB36AE563}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject.Tests", "test\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject.Tests\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject.Tests.csproj", "{1B39FD57-82E7-48B9-B348-AD5FB36AE563}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService.SampleProject.SimpleApproach", "samples\IdentityServer4.HttpClientService.SampleProject.SimpleApproach\IdentityServer4.HttpClientService.SampleProject.SimpleApproach.csproj", "{C043BC30-5A90-49CA-81BE-38267318ABB8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService.FeaturesSample", "samples\IdentityServer4.Contrib.HttpClientService.FeaturesSample\IdentityServer4.Contrib.HttpClientService.FeaturesSample.csproj", "{C043BC30-5A90-49CA-81BE-38267318ABB8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29503.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.HttpClientService", "src\IdentityServer4.HttpClientService\IdentityServer4.HttpClientService.csproj", "{05D7258E-58E4-4847-B62D-D36F9F61C8DA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.Contrib.HttpClientService", "src\IdentityServer4.Contrib.HttpClientService\IdentityServer4.Contrib.HttpClientService.csproj", "{05D7258E-58E4-4847-B62D-D36F9F61C8DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Expand Up @@ -35,6 +35,6 @@ steps:
displayName: Pack
inputs:
command: 'pack'
packagesToPack: 'src/IdentityServer4.HttpClientService/IdentityServer4.HttpClientService.csproj'
packagesToPack: 'src/IdentityServer4.Contrib.HttpClientService/IdentityServer4.Contrib.HttpClientService.csproj'
configuration: 'Release'
versioningScheme: 'off'
1,327 changes: 1,327 additions & 0 deletions docs/IdentityServer4.Contrib.HttpClientService.xml

Large diffs are not rendered by default.

554 changes: 277 additions & 277 deletions docs/IdentityServer4.HttpClientService.xml

Large diffs are not rendered by default.

@@ -1,12 +1,12 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Extensions;
using System;
using System.IO;
using System.Text;

namespace IdentityServer4.HttpClientService.SampleProject.Controllers
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample.Controllers
{
/// <summary>
/// Sample controller for the <see cref="HttpClientService"/>
Expand Down
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Extensions;


namespace IdentityServer4.HttpClientService.SampleProject.Controllers
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample.Controllers
{
/// <summary>
/// Sample controller for the <see cref="HttpClientService"/>
Expand All @@ -25,15 +25,15 @@ public SampleAuthController(IHttpClientServiceFactory requestServiceFactory)
}

/// <summary>
/// The simples possible call, to a resource that needs no authentication
/// The simples possible call to a resource that needs no authentication
/// </summary>
/// <returns></returns>
[HttpGet("no-auth")]
public async Task<IActionResult> NoAuthenticationNeeded()
{
var responseObject = await _requestServiceFactory
.CreateHttpClientService() //Create a new unnamed service (prefer named instances to avoid socket exhaustion issues.
// Read more about HttpClient issues here: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net-core
// read more about HttpClient issues here: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net-core
.GetAsync("http://localhost:5000/dummy-data/complex-type"); //Execute a GET request to any URL.


Expand All @@ -44,17 +44,17 @@ public async Task<IActionResult> NoAuthenticationNeeded()
}

/// <summary>
/// Call to an IdentityServer4 proteced resource
/// Call to an IdentityServer4 protected resource
/// </summary>
/// <returns></returns>
[HttpGet("auth")]
public async Task<IActionResult> AuthenticationNeeded()
{
var responseObject = await _requestServiceFactory
.CreateHttpClientService() //Create a new unnamed service (prefer named instances to avoid socket exhaustion issues.
// Read more about HttpClient issues here: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net-core
// read more about HttpClient issues here: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net-core
.SetIdentityServerOptions("ProtectedResourceAccessTokenOptions") //Set the configuration section name that contain the credentials for IdentityServer4
// For typed configuration, check the CompleteSample
// for typed configuration, check the CompleteSample
.GetAsync("https://demo.identityserver.io/api/test"); //Execute a GET request to a protected resource.


Expand Down
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Extensions;
using System;
using System.Linq;

namespace IdentityServer4.HttpClientService.SampleProject.Controllers
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample.Controllers
{
/// <summary>
/// Sample controller for the <see cref="HttpClientService"/>
Expand Down
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Extensions;
using System;
using System.Linq;

namespace IdentityServer4.HttpClientService.SampleProject.Controllers
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample.Controllers
{
/// <summary>
/// Sample controller for the <see cref="HttpClientService"/>
Expand Down
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\IdentityServer4.HttpClientService\IdentityServer4.HttpClientService.csproj" />
<ProjectReference Include="..\..\src\IdentityServer4.Contrib.HttpClientService\IdentityServer4.Contrib.HttpClientService.csproj" />
</ItemGroup>

</Project>
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace IdentityServer4.HttpClientService.SampleProject
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample
{
/// <summary>
/// ASP.NET Core web application is actually a console project.
Expand Down
Expand Up @@ -3,9 +3,9 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Extensions;

namespace IdentityServer4.HttpClientService.SampleProject
namespace IdentityServer4.Contrib.HttpClientService.FeaturesSample
{
/// <summary>
/// The Startup class configures services and the app's request pipeline.
Expand Down
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Options;
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="IOptions{TTokenServiceOptions}" /> extensions.
Expand Down
@@ -1,9 +1,9 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,9 +1,9 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,9 +1,9 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,10 +1,10 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.IO;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,10 +1,10 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.IO;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,10 +1,10 @@
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.IO;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Static object for <see cref="HttpClientService" /> extensions.
Expand Down
@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using IdentityServer4.HttpClientService.Infrastructure;
using IdentityServer4.Contrib.HttpClientService.Infrastructure;

namespace IdentityServer4.HttpClientService.Extensions
namespace IdentityServer4.Contrib.HttpClientService.Extensions
{
/// <summary>
/// Extensions methods for setting up the RequestService in an <see cref="IServiceCollection"/>.
Expand Down
Expand Up @@ -6,13 +6,13 @@
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using IdentityServer4.HttpClientService.Infrastructure;
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Infrastructure;
using IdentityServer4.Contrib.HttpClientService.Models;
using System.IO;
using System.Collections.Generic;
using Microsoft.Extensions.Configuration;

namespace IdentityServer4.HttpClientService
namespace IdentityServer4.Contrib.HttpClientService
{
/// <summary>
/// The request service implemantation
Expand Down
Expand Up @@ -7,14 +7,14 @@
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using IdentityServer4.HttpClientService.Infrastructure;
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Infrastructure;
using IdentityServer4.Contrib.HttpClientService.Models;
using System.IO;
using System.Collections.Generic;
using System.Configuration;
using Microsoft.Extensions.Configuration;

namespace IdentityServer4.HttpClientService
namespace IdentityServer4.Contrib.HttpClientService
{
/// <summary>
/// A factory that creates <see cref="HttpClientService"/> instances for a given logical name.
Expand Down
@@ -1,4 +1,4 @@
namespace IdentityServer4.HttpClientService
namespace IdentityServer4.Contrib.HttpClientService
{
/// <summary>
/// An abstraction of the factory that creates <see cref="HttpClientService"/> instances for a given logical name.
Expand Down
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>..\..\docs\IdentityServer4.HttpClientService.xml</DocumentationFile>
<DocumentationFile>..\..\docs\IdentityServer4.Contrib.HttpClientService.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
Expand Up @@ -2,7 +2,7 @@
using System;
using System.Net.Http;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{
/// <summary>
/// A <see cref="HttpRequestMessage"/> factory.
Expand Down
@@ -1,6 +1,6 @@
using System.Net.Http;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{
/// <summary>
/// Abstraction for an <see cref="HttpRequestMessage"/> factory.
Expand Down
Expand Up @@ -2,7 +2,7 @@
using System;
using System.Threading.Tasks;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{
/// <summary>
/// Interface for the cache manager for the access token service.
Expand Down
@@ -1,9 +1,9 @@
using IdentityModel.Client;
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Models;
using Microsoft.Extensions.Options;
using System.Threading.Tasks;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{
/// <summary>
/// Abstraction for an access token service.
Expand Down
Expand Up @@ -4,7 +4,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{
/// <summary>
/// Cache manager for the IdentityServer4 <see cref="TokenResponse"/>.
Expand Down
Expand Up @@ -4,10 +4,10 @@
using System.Threading.Tasks;
using IdentityModel.Client;
using Microsoft.Extensions.Options;
using IdentityServer4.HttpClientService.Extensions;
using IdentityServer4.HttpClientService.Models;
using IdentityServer4.Contrib.HttpClientService.Extensions;
using IdentityServer4.Contrib.HttpClientService.Models;

namespace IdentityServer4.HttpClientService.Infrastructure
namespace IdentityServer4.Contrib.HttpClientService.Infrastructure
{

/// <summary>
Expand Down
@@ -1,4 +1,4 @@
namespace IdentityServer4.HttpClientService.Models
namespace IdentityServer4.Contrib.HttpClientService.Models
{

/// <summary>
Expand Down
Expand Up @@ -4,7 +4,7 @@
using System.Net.Http;
using System.Net.Http.Headers;

namespace IdentityServer4.HttpClientService.Models
namespace IdentityServer4.Contrib.HttpClientService.Models
{
/// <summary>
/// An object containing information about the response of the current request.
Expand Down
Expand Up @@ -19,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\IdentityServer4.HttpClientService.IntegrationTestsProject\IdentityServer4.HttpClientService.IntegrationTestsProject.csproj" />
<ProjectReference Include="..\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject\IdentityServer4.Contrib.HttpClientService.IntegrationTestsProject.csproj" />
</ItemGroup>

</Project>

0 comments on commit 04a58cc

Please sign in to comment.