Skip to content

Commit 9a68a2b

Browse files
committed
Convert AspNet.Security.OAuth.Extensions to a non-packable shared sources project
1 parent 91e709c commit 9a68a2b

File tree

49 files changed

+53
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+53
-74
lines changed

AspNet.Security.OAuth.Providers.sln

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.GitHu
1111
EndProject
1212
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Client", "samples\Mvc.Client\Mvc.Client.csproj", "{68631868-902A-46FB-9A44-BACF1812FBDE}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Extensions", "src\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj", "{FE52A431-57AD-45FA-AA59-C63CB6EA3F31}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Extensions", "shared\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj", "{FE52A431-57AD-45FA-AA59-C63CB6EA3F31}"
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.LinkedIn", "src\AspNet.Security.OAuth.LinkedIn\AspNet.Security.OAuth.LinkedIn.csproj", "{0351689C-EAB7-42D0-966F-4021B89EF553}"
1717
EndProject
@@ -99,6 +99,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Amazo
9999
EndProject
100100
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Discord", "src\AspNet.Security.OAuth.Discord\AspNet.Security.OAuth.Discord.csproj", "{86614CB9-0768-40BF-8C27-699E3990B733}"
101101
EndProject
102+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{CA7BFFF8-0DC9-4621-8DFE-D3E6A116C509}"
103+
EndProject
102104
Global
103105
GlobalSection(SolutionConfigurationPlatforms) = preSolution
104106
Debug|Any CPU = Debug|Any CPU
@@ -296,7 +298,7 @@ Global
296298
GlobalSection(NestedProjects) = preSolution
297299
{9DFEE19E-C170-4F20-93F3-EC952B1532F2} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
298300
{68631868-902A-46FB-9A44-BACF1812FBDE} = {BAC7067D-88FE-4385-8AC9-1A325FFBDE69}
299-
{FE52A431-57AD-45FA-AA59-C63CB6EA3F31} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
301+
{FE52A431-57AD-45FA-AA59-C63CB6EA3F31} = {CA7BFFF8-0DC9-4621-8DFE-D3E6A116C509}
300302
{0351689C-EAB7-42D0-966F-4021B89EF553} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
301303
{38E5DB77-7F35-4E3C-9719-8A25CE4130CA} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
302304
{F79E8D15-F296-424C-A50E-AE39EB2C609F} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}

samples/Mvc.Client/Startup.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* for more information concerning the license and the contributors participating to this project.
55
*/
66

7-
using AspNet.Security.OAuth.GitHub;
87
using Microsoft.AspNetCore.Authentication.Cookies;
98
using Microsoft.AspNetCore.Builder;
109
using Microsoft.AspNetCore.Http;
@@ -48,13 +47,6 @@ public void Configure(IApplicationBuilder app)
4847
ConsumerSecret = "Il2eFzGIrYhz6BWjYhVXBPQSfZuS4xoHpSSyD9PI"
4948
});
5049

51-
app.UseGitHubAuthentication(new GitHubAuthenticationOptions
52-
{
53-
ClientId = "49e302895d8b09ea5656",
54-
ClientSecret = "98f1bf028608901e9df91d64ee61536fe562064b",
55-
Scope = { "user:email" }
56-
});
57-
5850
app.UseMvc();
5951
}
6052
}

src/AspNet.Security.OAuth.Extensions/AspNet.Security.OAuth.Extensions.csproj renamed to shared/AspNet.Security.OAuth.Extensions/AspNet.Security.OAuth.Extensions.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Import Project="..\..\build\packages.props" />
3+
<Import Project="..\..\build\common.props" />
44

55
<PropertyGroup>
66
<TargetFrameworks>net451;netstandard1.3</TargetFrameworks>
7-
</PropertyGroup>
8-
9-
<PropertyGroup>
10-
<Description>ASP.NET Core extensions making OAuth2 authentication easier to use.</Description>
11-
<Authors>Kévin Chalet;Jerrie Pelser</Authors>
12-
<PackageTags>aspnetcore;authentication;oauth;security</PackageTags>
7+
<IsPackable>false</IsPackable>
138
</PropertyGroup>
149

1510
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">

src/AspNet.Security.OAuth.Extensions/ClaimsExtensions.cs renamed to shared/AspNet.Security.OAuth.Extensions/ClaimsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace AspNet.Security.OAuth.Extensions
1111
{
12-
public static class ClaimsExtensions
12+
internal static class ClaimsExtensions
1313
{
1414
public static ClaimsIdentity AddOptionalClaim(this ClaimsIdentity identity, string name, string value, string issuer)
1515
{

src/AspNet.Security.OAuth.Amazon/AmazonAuthenticationHandler.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,15 @@
1818

1919
namespace AspNet.Security.OAuth.Amazon
2020
{
21-
/// <summary>
22-
/// A class representing an authentication handler for Amazon.
23-
/// </summary>
2421
public class AmazonAuthenticationHandler : OAuthHandler<AmazonAuthenticationOptions>
2522
{
26-
/// <summary>
27-
/// Initializes a new instance of the <see cref="AmazonAuthenticationHandler"/> class.
28-
/// </summary>
29-
/// <param name="client">The <see cref="HttpClient"/> to use.</param>
3023
public AmazonAuthenticationHandler([NotNull] HttpClient client)
3124
: base(client)
3225
{
3326
}
3427

35-
/// <inheritdoc />
36-
protected override async Task<AuthenticationTicket> CreateTicketAsync(
37-
[NotNull] ClaimsIdentity identity,
38-
[NotNull] AuthenticationProperties properties,
39-
[NotNull] OAuthTokenResponse tokens)
28+
protected override async Task<AuthenticationTicket> CreateTicketAsync([NotNull] ClaimsIdentity identity,
29+
[NotNull] AuthenticationProperties properties, [NotNull] OAuthTokenResponse tokens)
4030
{
4131
var endpoint = Options.UserInformationEndpoint;
4232

src/AspNet.Security.OAuth.Amazon/AspNet.Security.OAuth.Amazon.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj" PrivateAssets="All" />
16+
<Compile Include="..\..\shared\AspNet.Security.OAuth.Extensions\*.cs" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/AspNet.Security.OAuth.ArcGIS/AspNet.Security.OAuth.ArcGIS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj" PrivateAssets="All" />
16+
<Compile Include="..\..\shared\AspNet.Security.OAuth.Extensions\*.cs" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/AspNet.Security.OAuth.Asana/AspNet.Security.OAuth.Asana.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj" PrivateAssets="All" />
16+
<Compile Include="..\..\shared\AspNet.Security.OAuth.Extensions\*.cs" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/AspNet.Security.OAuth.Autodesk/AspNet.Security.OAuth.Autodesk.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj" PrivateAssets="All" />
16+
<Compile Include="..\..\shared\AspNet.Security.OAuth.Extensions\*.cs" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/AspNet.Security.OAuth.Automatic/AspNet.Security.OAuth.Automatic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\AspNet.Security.OAuth.Extensions\AspNet.Security.OAuth.Extensions.csproj" PrivateAssets="All" />
16+
<Compile Include="..\..\shared\AspNet.Security.OAuth.Extensions\*.cs" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

0 commit comments

Comments
 (0)