Skip to content

Commit

Permalink
Merge pull request #149 from DuendeSoftware/joe/revert-bad-v6
Browse files Browse the repository at this point in the history
Revert "Add PAR sample"
  • Loading branch information
brockallen authored Nov 17, 2023
2 parents 2e33f46 + 26163d0 commit 01f9101
Show file tree
Hide file tree
Showing 54 changed files with 8 additions and 39,851 deletions.
31 changes: 0 additions & 31 deletions IdentityServer/v6/Basics/IdentityServer/src/Clients.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,6 @@ public static class Clients
AllowOfflineAccess = true,
AllowedScopes = { "openid", "profile", "scope1", "scope2" }
},

///////////////////////////////////////////
// MVC PAR Sample
//////////////////////////////////////////
new Client
{
ClientId = "mvc.par",
ClientName = "MVC PAR Client",

ClientSecrets =
{
new Secret("secret".Sha256())
},

RequireRequestObject = false,

AllowedGrantTypes = GrantTypes.Code,

RequirePushedAuthorization = true,

// Note that redirect uris are optional for PAR clients when the
// AllowUnregisteredPushedRedirectUris flag is enabled
// RedirectUris = { "https://localhost:44300/signin-oidc" },

FrontChannelLogoutUri = "https://localhost:44300/signout-oidc",
PostLogoutRedirectUris = { "https://localhost:44300/signout-callback-oidc" },

AllowOfflineAccess = true,

AllowedScopes = { "openid", "profile", "scope1", "scope2" }
},
};
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="7.0.0-preview.2" />
<PackageReference Include="Duende.IdentityServer" Version="6.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// See LICENSE in the project root for license information.


using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.RazorPages;

Expand All @@ -18,13 +17,13 @@ public override void OnResultExecuting(ResultExecutingContext context)
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
if (!context.HttpContext.Response.Headers.ContainsKey("X-Content-Type-Options"))
{
context.HttpContext.Response.Headers.Append("X-Content-Type-Options", "nosniff");
context.HttpContext.Response.Headers.Add("X-Content-Type-Options", "nosniff");
}

// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
if (!context.HttpContext.Response.Headers.ContainsKey("X-Frame-Options"))
{
context.HttpContext.Response.Headers.Append("X-Frame-Options", "SAMEORIGIN");
context.HttpContext.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
}

// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
Expand All @@ -37,19 +36,19 @@ public override void OnResultExecuting(ResultExecutingContext context)
// once for standards compliant browsers
if (!context.HttpContext.Response.Headers.ContainsKey("Content-Security-Policy"))
{
context.HttpContext.Response.Headers.Append("Content-Security-Policy", csp);
context.HttpContext.Response.Headers.Add("Content-Security-Policy", csp);
}
// and once again for IE
if (!context.HttpContext.Response.Headers.ContainsKey("X-Content-Security-Policy"))
{
context.HttpContext.Response.Headers.Append("X-Content-Security-Policy", csp);
context.HttpContext.Response.Headers.Add("X-Content-Security-Policy", csp);
}

// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
var referrer_policy = "no-referrer";
if (!context.HttpContext.Response.Headers.ContainsKey("Referrer-Policy"))
{
context.HttpContext.Response.Headers.Append("Referrer-Policy", referrer_policy);
context.HttpContext.Response.Headers.Add("Referrer-Policy", referrer_policy);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion IdentityServer/v6/Basics/IdentityServer/src/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public void ConfigureServices(IServiceCollection services)

// see https://docs.duendesoftware.com/identityserver/v6/fundamentals/resources/api_scopes
options.EmitStaticAudienceClaim = true;
options.PushedAuthorization.AllowUnregisteredPushedRedirectUris = true;
})
.AddTestUsers(TestUsers.Users);

Expand Down
34 changes: 0 additions & 34 deletions IdentityServer/v6/Basics/MvcPar/MvcPar.sln

This file was deleted.

20 changes: 0 additions & 20 deletions IdentityServer/v6/Basics/MvcPar/src/Client.csproj

This file was deleted.

36 changes: 0 additions & 36 deletions IdentityServer/v6/Basics/MvcPar/src/Controllers/HomeController.cs

This file was deleted.

142 changes: 0 additions & 142 deletions IdentityServer/v6/Basics/MvcPar/src/ParOidcEvents.cs

This file was deleted.

47 changes: 0 additions & 47 deletions IdentityServer/v6/Basics/MvcPar/src/Program.cs

This file was deleted.

Loading

0 comments on commit 01f9101

Please sign in to comment.