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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ jobs:
run: dotnet restore Bijecta.CliAuth.slnx --locked-mode
- name: Build
run: dotnet build Bijecta.CliAuth.slnx --configuration Release --no-restore
# The fixture helper, formatting, and AOT analysis give the same result on every OS, so they run on Linux only.
# Jobs and their names stay per OS: they are required checks on main.
- name: Build .NET fixture helper
if: runner.os == 'Linux'
run: dotnet build samples/keycloak/fixture.cs --configuration Release
- name: Test
run: dotnet test --solution Bijecta.CliAuth.slnx --configuration Release --no-build
- name: Check formatting
if: runner.os == 'Linux'
run: dotnet format Bijecta.CliAuth.slnx --verify-no-changes --no-restore

native-aot:
Expand Down Expand Up @@ -66,7 +70,9 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y clang zlib1g-dev
# IsAotCompatible and PublishAot add SDK-versioned and runtime-specific lock entries, so these
# restores are not locked; the build job keeps locked restore. Trim/AOT warnings are errors.
# Analyzer results do not depend on the host OS; the native publish and smoke below still run on every OS.
- name: Analyze every library for trim and AOT compatibility
if: runner.os == 'Linux'
run: |
set -euo pipefail
for project in src/*/*.csproj; do
Expand Down
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Bijecta.CliAuth

Reusable .NET packages for developers adding browser PKCE and device login to their
own CLI applications using an OIDC provider such as Keycloak or Okta.
Open-source .NET packages for teams building CLI tools that sign users in through
their own OIDC provider, in the spirit of `gh auth login` and `az login`: browser or
device login, silent refresh, status, and logout.

**Status: early development. Browser PKCE and device login, lazy discovery,
ID-token validation, session coordination, memory storage, and explicitly selected
plaintext file storage, and silent refresh are implemented. Deterministic protocol
tests and Keycloak integration coverage exercise both flows and refresh. HTTP and DI
integration, other providers, packaging, and protected storage remain unfinished; see the
[roadmap](docs/ROADMAP.md).**
**Status: early development. Implemented: browser PKCE and device login, lazy
discovery, ID-token validation, silent refresh, session coordination across threads
and processes, memory storage, and explicitly selected plaintext file storage.
Deterministic protocol tests and hosted runs against Keycloak, Duende IdentityServer,
Auth0, and Microsoft Entra ID cover both flows and refresh. Not yet done: OS keyring
storage, HTTP and DI integration, and packaging; see the [roadmap](docs/ROADMAP.md).**

## Packages

Expand Down Expand Up @@ -49,9 +50,10 @@ three different versions of the portable Core package. NuGet packing/release che
will be a separate step. Keycloak/Playwright tests use a separate integration solution
and Linux CI job; see [integration prerequisites and commands](tests/Bijecta.CliAuth.KeycloakTests/README.md).
Other providers use the [provider tests](tests/Bijecta.CliAuth.ProviderTests/README.md) and their own workflow.
The fixture helper is managed .NET code, with Native AOT disabled. On each OS, CI
builds every library with `-p:IsAotCompatible=true` (trim and AOT warnings are errors),
publishes the sample with Native AOT, and smoke-tests the binary:
The fixture helper is managed .NET code, with Native AOT disabled. CI builds every
library with `-p:IsAotCompatible=true` on Linux (trim and AOT warnings are errors; the
result does not depend on the OS), and on each OS publishes the sample with Native AOT
and smoke-tests the binary. The format check also runs on Linux only:

```sh
dotnet publish samples/Bijecta.CliAuth.Sample.Cli -c Release -r <rid> -p:PublishAot=true -o artifacts/aot
Expand Down Expand Up @@ -80,21 +82,22 @@ configured profile's status.
| Duende IdentityServer | ✅ | ✅ | ✅ | [Duende](docs/providers/duende.md) |
| Auth0 | ✅ | ✅ | ✅ | [Auth0](docs/providers/auth0.md) |
| Microsoft Entra ID | ✅ | ✅ | ✅ | [Entra ID](docs/providers/entra.md) |
| Okta, Google | not tested | not tested | not tested | — |
| GitHub | not tested | not tested | not tested | — |
| Okta | not tested | not tested | not tested | — |

✅ means a passing hosted CI run. Details, the legend, and the tested versions are in the
[compatibility table](docs/providers/README.md).
[compatibility table](docs/providers/README.md). Plain OAuth providers without OIDC (such
as GitHub) and providers whose native clients need a client secret (such as Google) are
out of scope.

## Roadmap

The [roadmap](docs/ROADMAP.md) lists the ordered milestones: an AOT guard, silent
refresh, provider compatibility (Okta, Auth0, Entra ID, Google, IdentityServer),
the HTTP/DI integration layer, a first preview release, and protected storage.
The [roadmap](docs/ROADMAP.md) lists the ordered milestones. Done: an AOT guard, silent
refresh, and provider compatibility. Next: OS keyring storage, login ergonomics (device
login over SSH, a token override for scripts), the HTTP/DI integration layer, and then a
first preview release.

Both login flows are part of the first usable preview. That preview may use explicitly
selected plaintext persistence; protected storage is deferred. Workers, client credentials,
and token exchange are outside scope. Dependency review, final license/author and
The first preview stores tokens in the OS keyring by default; plaintext files stay an
explicit opt-in. Workers, client credentials, and token exchange are outside scope. Dependency review, final license/author and
repository metadata, security reporting setup, native backend tests, and release
validation remain outstanding. Scaffold packages are not release artifacts.

Expand Down
Loading
Loading