Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,21 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
6.0.x
8.0.x
9.0.103
10.0.x

- run: dotnet --list-sdks

- name: Install .NET Aspire workload
run: dotnet workload install aspire

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
Expand All @@ -61,6 +62,6 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- run: ./build.sh build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
13 changes: 13 additions & 0 deletions IdentityServer/v7/AspNetIdentityPasskeys/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "10.0.0-preview.7.25380.108",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}
5 changes: 5 additions & 0 deletions IdentityServer/v7/AspNetIdentityPasskeys/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin/
obj/
/packages/
riderModule.iml
/_ReSharper.Caches/
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerAspNetIdentityPasskeys", "IdentityServerAspNetIdentityPasskeys\IdentityServerAspNetIdentityPasskeys.csproj", "{BFF3D2A2-391A-477F-81DE-9A2ED321C41C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{0BF13ED9-61A5-4DAC-9E47-E2D0372F8DF6}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{2D99DC4E-FF98-48C7-B897-E4C6F0CE42A0}"
ProjectSection(SolutionItems) = preProject
dotnet-tools.json = .config/dotnet-tools.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BFF3D2A2-391A-477F-81DE-9A2ED321C41C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFF3D2A2-391A-477F-81DE-9A2ED321C41C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFF3D2A2-391A-477F-81DE-9A2ED321C41C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFF3D2A2-391A-477F-81DE-9A2ED321C41C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2D99DC4E-FF98-48C7-B897-E4C6F0CE42A0} = {0BF13ED9-61A5-4DAC-9E47-E2D0372F8DF6}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using Duende.IdentityServer.Models;

namespace IdentityServerAspNetIdentityPasskeys;

public static class Config
{
public static IEnumerable<IdentityResource> IdentityResources =>
new IdentityResource[]
{
new IdentityResources.OpenId(),
new IdentityResources.Profile(),
};

public static IEnumerable<ApiScope> ApiScopes =>
new ApiScope[]
{
new ApiScope("scope1"),
new ApiScope("scope2"),
};

public static IEnumerable<Client> Clients =>
new Client[]
{
// m2m client credentials flow client
new Client
{
ClientId = "m2m.client",
ClientName = "Client Credentials Client",

AllowedGrantTypes = GrantTypes.ClientCredentials,
ClientSecrets = { new Secret("511536EF-F270-4058-80CA-1C89C192F69A".Sha256()) },

AllowedScopes = { "scope1" }
},

// interactive client using code flow + pkce
new Client
{
ClientId = "interactive",
ClientSecrets = { new Secret("49C1A7E1-0C79-4A89-A3D6-A37998FB86B0".Sha256()) },

AllowedGrantTypes = GrantTypes.Code,

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

AllowOfflineAccess = true,
AllowedScopes = { "openid", "profile", "scope2" }
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using IdentityServerAspNetIdentityPasskeys.Models;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;

namespace IdentityServerAspNetIdentityPasskeys.Data;

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}

protected override void OnModelCreating(ModelBuilder builder) =>
base.OnModelCreating(
builder); // Customize the ASP.NET Identity model and override the defaults if needed.// For example, you can rename the ASP.NET Identity table names and more.// Add your customizations after calling base.OnModelCreating(builder);
}
Loading
Loading