# identity-provider **Repository Path**: ymjake/identity-provider ## Basic Information - **Project Name**: identity-provider - **Description**: Identity Provider QuickStart Workspace - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-12 - **Last Updated**: 2026-07-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: oidc, IDP, openId, OAuth ## README # Identity Provider QuickStart Workspace 这个仓库当前是一个本地模板工作区,目标是整理出两套尽量干净、可直接运行的身份服务示例: - `src/Open.IdentityServer.QuickStart.UI` - `src/Openiddict.QuickStart.UI` 两套项目都基于 `.NET 10`,都使用本地 `SQLite`,方便直接启动和对照。 ## 当前状态 ### 1. Open.IdentityServer.QuickStart.UI 定位: - 参考 `IdentityServer4AspNetIdentity` 的最小可用模板 - 保留本地登录、授权页、同意页、诊断页、授权码流程示例 - 适合用来做老 `IdentityServer4` 风格 quickstart 的迁移底板 当前特性: - 本地数据库:`open-identityserver-quickstart.db` - 本地用户种子: - `alice / Pass123$` - `bob / Pass123$` - 默认客户端: - `client`:client credentials - `mvc`:authorization code + PKCE + refresh token - `spa`:authorization code + PKCE - 默认地址: - `https://localhost:5243` - `http://localhost:5223` 备注: - 已移除手写 `GlobalUsings.cs` - `Program.cs` 已补充偏复习向注释 - claim 写法保持直接字符串,不额外包一层老式常量类型 ### 2. Openiddict.QuickStart.UI 定位: - 做一套更贴近 `OpenIddict` 当前用法的最小模板 - 保留 ASP.NET Core Identity + OpenIddict Server 的基础组合 当前特性: - 本地数据库:`openiddict-quickstart.db` - 默认种子数据: - `web_client` - `res_server` - `api` scope - 默认地址: - `https://localhost:7051` - `http://localhost:5166` 说明: - 当前代码里默认会初始化 `client/scope` - 本地用户不走固定种子账号,直接使用 ASP.NET Core Identity UI 注册即可 - 如果首页文案还残留 demo 用户提示,以代码和种子逻辑为准 ## 运行方式 先恢复依赖: ```powershell dotnet restore ``` 启动 `Open.IdentityServer` 版本: ```powershell dotnet run --project src/Open.IdentityServer.QuickStart.UI/Open.IdentityServer.QuickStart.UI.csproj ``` 启动 `OpenIddict` 版本: ```powershell dotnet run --project src/Openiddict.QuickStart.UI/Openiddict.QuickStart.UI.csproj ``` ## 常用入口 ### Open.IdentityServer - Home: `https://localhost:5243/` - Discovery: `https://localhost:5243/.well-known/openid-configuration` - Grants: `https://localhost:5243/grants` - Diagnostics: `https://localhost:5243/diagnostics` - SPA sample callback base url: `http://localhost:5003` ### OpenIddict - Home: `https://localhost:7051/` - Discovery: `https://localhost:7051/.well-known/openid-configuration` - Login/Register: `https://localhost:7051/Identity/Account/Login` ### Vue Login Sample - Path: `samples/OidcLoginClient` - URL: `http://localhost:5003` - Default target authority: `https://localhost:5243` - Purpose: 仅验证浏览器端 OIDC 登录、回调、登出和 `userinfo` 调用 ## 已验证 当前两个项目都已在本机通过构建验证: ```powershell dotnet build src/Open.IdentityServer.QuickStart.UI/Open.IdentityServer.QuickStart.UI.csproj dotnet build src/Openiddict.QuickStart.UI/Openiddict.QuickStart.UI.csproj ``` ## 后续整理方向 - 继续清理 `OpenIddict` 首页和文案残留 - 给两个模板补统一的客户端示例说明 - 视需要再拆成真正可发布的 template/package 结构