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
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Then we can decide if and how a feature or a change could be implemented and if
Also read this first: [Being a good open source citizen](https://hackernoon.com/being-a-good-open-source-citizen-9060d0ab9732#.x3hocgw85)

## Found an issue or a bug?
Please start a discussion on the [repository issue tracker](https://github.com/joneja09/IdentityServer4/issues).
Please start a discussion on the [repository issue tracker](https://github.com/joneja09/ForgePoint.Identity/issues).

## Filing issues
The best way to get your bug fixed is to be as detailed as you can be about the problem.
Expand Down
6 changes: 2 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
**At this point we cannot accept PRs anymore. Thanks!**
Thanks for contributing to ForgePoint.Identity.

This organization is not maintained anymore besides critical security bugfixes (if feasible). This organization will be archived when .NET Core 3.1 end of support is reached (3rd Dec 2022). All new development is happening in the new [Duende Software](https://github.com/duendesoftware) organization.

The new [Duende IdentityServer](https://duendesoftware.com/products/identityserver) comes with a commercial license but is [free](https://blog.duendesoftware.com/posts/20220111_fair_trade/) for dev/testing/personal projects and companies or individuals making less than 1M USD gross annnual revenue. Please [get in touch with us](https://duendesoftware.com/contact) if you have any question.
Please describe the change, why it is needed, and how you tested it.
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- main
- features/**
- cursor/**
tags:
- '*.*.*'
pull_request:

env:
Expand All @@ -23,25 +21,26 @@ jobs:
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x

- run: dotnet --info

- name: Upgrade script tests
if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu')
if: runner.os != 'Windows'
working-directory: scripts/upgrade-namespaces
run: python3 test_rewrite.py

- if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu')

- name: Build and test
if: runner.os != 'Windows'
run: ./build.sh
- if: matrix.runs-on == 'windows-latest' && github.ref != 'refs/heads/main' && !contains(github.ref, 'refs/tags/')

- name: Build and test
if: runner.os == 'Windows'
run: ./build.ps1
- if: (matrix.runs-on == 'windows-latest') && (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/'))
env:
SignClientSecret: ${{ secrets.SIGNCLIENT }}
run: |
./build.ps1 sign
dotnet nuget push .\nuget\*.nupkg -s https://www.myget.org/F/identity/api/v2/package -k ${{ secrets.MYGET }}
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
tags:
- '*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Git tag to build and publish (for example 10.0.0)'
required: true

permissions:
contents: write
id-token: write

env:
DOTNET_NOLOGO: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x

- name: Build, test, and pack
run: ./build.sh

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
generate_release_notes: true
files: nuget/*.nupkg

- name: NuGet login (OIDC)
if: ${{ vars.NUGET_USER != '' }}
id: nuget-login
uses: NuGet/login@v1
with:
user: ${{ vars.NUGET_USER }}

- name: Publish to NuGet.org
if: ${{ vars.NUGET_USER != '' }}
run: |
dotnet nuget push ./nuget/*.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" \
--skip-duplicate
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Duende IdentityServer is the commercial successor of the original IdentityServer
| `ForgePoint.Identity.EntityFramework.Storage` | EF Core entities and stores |
| `ForgePoint.Identity.AspNetIdentity` | ASP.NET Core Identity integration |

```bash
dotnet add package ForgePoint.Identity
```

## How to build

* Install the [.NET 10 SDK](https://dotnet.microsoft.com/download) (the SDK also builds the `net8.0` TFM)
Expand All @@ -39,6 +43,36 @@ Duende IdentityServer is the commercial successor of the original IdentityServer

The build packs each project into `./nuget` in dependency order: Storage → Identity → EntityFramework.Storage → EntityFramework → AspNetIdentity.

## Releasing

Version numbers come from [MinVer](https://github.com/adamralph/minver) git tags (`10.0.0`, not `v10.0.0`).

The Release workflow packs the libraries, creates a GitHub Release with the `.nupkg` files, and publishes to nuget.org via [Trusted Publishing](https://learn.microsoft.com/nuget/nuget-org/trusted-publishing) (GitHub OIDC → a one-hour nuget.org API key). There is no long-lived `NUGET_API_KEY`.

### One-time nuget.org setup

1. Sign in at [nuget.org](https://www.nuget.org/) (your **profile name**, not your email).
2. Open **Trusted Publishing** and add a policy owned by your user (or your org):
- **Repository Owner:** `joneja09`
- **Repository:** `ForgePoint.Identity`
- **Workflow File:** `release.yml` (file name only)
- **Environment:** leave empty
3. In this GitHub repo, **Settings → Secrets and variables → Actions → Variables**, add `NUGET_USER` set to that same nuget.org profile name.

Until `NUGET_USER` is set, the workflow still creates the GitHub Release and skips nuget.org.

### Cut a release

```bash
git checkout main
git pull
git tag 10.0.1
git push origin 10.0.1
```

To publish an existing tag (for example `10.0.0`) after Trusted Publishing is configured: **Actions → Release → Run workflow** and enter the tag name.


## Quick start

```csharp
Expand Down
45 changes: 24 additions & 21 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ErrorActionPreference = "Stop";
$ErrorActionPreference = "Stop"

if (Test-Path ./nuget) {
Remove-Item ./nuget -Recurse -Force
Expand All @@ -11,23 +11,26 @@ Get-ChildItem -Path $nugetPackages -Directory -ErrorAction SilentlyContinue |
Remove-Item -Recurse -Force

dotnet tool restore

pushd ./src/Storage
Invoke-Expression "./build.ps1 $args"
popd

pushd ./src/IdentityServer4
Invoke-Expression "./build.ps1 $args"
popd

pushd ./src/EntityFramework.Storage
Invoke-Expression "./build.ps1 $args"
popd

pushd ./src/EntityFramework
Invoke-Expression "./build.ps1 $args"
popd

pushd ./src/AspNetIdentity
Invoke-Expression "./build.ps1 $args"
popd
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

$buildArgs = $args
$projects = @(
"./src/Storage",
"./src/IdentityServer4",
"./src/EntityFramework.Storage",
"./src/EntityFramework",
"./src/AspNetIdentity"
)

foreach ($project in $projects) {
Push-Location $project
try {
& ./build.ps1 @buildArgs
if ($LASTEXITCODE -ne 0) {
throw "Build failed in $project (exit $LASTEXITCODE)."
}
}
finally {
Pop-Location
}
}
2 changes: 1 addition & 1 deletion samples/Clients/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The client samples are designed to be used with the host in this repo:

https://github.com/joneja09/IdentityServer4/tree/main/src/IdentityServer4
https://github.com/joneja09/ForgePoint.Identity/tree/main/src/IdentityServer4
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
4 changes: 2 additions & 2 deletions src/AspNetIdentity/host/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
5 changes: 3 additions & 2 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<Company>ForgePoint Labs</Company>
<Product>ForgePoint.Identity</Product>
<Authors>ForgePoint Labs</Authors>
<PackageProjectUrl>https://github.com/joneja09/IdentityServer4</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/joneja09/IdentityServer4/releases</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/joneja09/ForgePoint.Identity</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/joneja09/ForgePoint.Identity/releases</PackageReleaseNotes>
<RepositoryUrl>https://github.com/joneja09/ForgePoint.Identity.git</RepositoryUrl>

<ForgePointIdentityVersion>10.0.0-*</ForgePointIdentityVersion>

Expand Down
4 changes: 2 additions & 2 deletions src/EntityFramework/host/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
4 changes: 2 additions & 2 deletions src/IdentityServer4/host/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</li>
<li>
Here are links to the
<a href="https://github.com/joneja09/IdentityServer4">source code repository</a>,
and <a href="https://github.com/joneja09/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/joneja09/ForgePoint.Identity">source code repository</a>,
and <a href="https://github.com/joneja09/ForgePoint.Identity/tree/main/samples">ready to use samples</a>.
</li>
</ul>
</div>
Loading