TCIS.Authentication.OpenIdConnect 1.0.0-rc.9

This is a prerelease version of TCIS.Authentication.OpenIdConnect.
dotnet add package TCIS.Authentication.OpenIdConnect --version 1.0.0-rc.9
                    
NuGet\Install-Package TCIS.Authentication.OpenIdConnect -Version 1.0.0-rc.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TCIS.Authentication.OpenIdConnect" Version="1.0.0-rc.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.Authentication.OpenIdConnect" Version="1.0.0-rc.9" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.Authentication.OpenIdConnect" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCIS.Authentication.OpenIdConnect --version 1.0.0-rc.9
                    
#r "nuget: TCIS.Authentication.OpenIdConnect, 1.0.0-rc.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TCIS.Authentication.OpenIdConnect@1.0.0-rc.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCIS.Authentication.OpenIdConnect&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.Authentication.OpenIdConnect&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Tool

TCIS.Authentication.OpenIdConnect

A library integrating OpenIdConnect (OIDC) and JWT Bearer authentication, supporting Keycloak/Custom Auth configuration for both Web Apps (redirect) and APIs (stateless). The library automatically reads configurations, standardizes claim mapping, and connects with the TCIS Context system (IWorkContext).

📦 Installation

dotnet add package TCIS.Authentication.OpenIdConnect

🚀 Usage

1. Web Application / Client (Requires Redirect Login - AddTOidc)

Used in MVC, Razor Pages, or Blazor applications that require users to log in via an Identity Provider's UI (e.g., Keycloak).

using TCIS.Authentication.OpenIdConnect;

var builder = WebApplication.CreateBuilder(args);

// Register OIDC from IConfiguration ("Authentication:Oidc" and "Authentication:TCIS" sections)
builder.Services.AddAuthentication(options => {
    options.DefaultScheme = "Cookies";
    options.DefaultChallengeScheme = "OpenIdConnect";
})
.AddCookie("Cookies")
.AddTOidc(builder.Configuration);

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.Run();

2. API / Microservice Application (Stateless - AddTJwtBearer)

Used in Backend APIs that only receive Tokens from the Client and do not perform redirections.

using TCIS.Authentication.OpenIdConnect;

var builder = WebApplication.CreateBuilder(args);

// Register JWT Bearer to validate tokens
builder.Services.AddAuthentication()
.AddTJwtBearer(builder.Configuration);

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.Run();

⚙️ Configuration (appsettings.json)

{
  "Authentication": {
    "Oidc": {
      "Authority": "https://auth.tcis.local/realms/tcis",
      "ClientId": "my-client-id",
      "ClientSecret": "my-secret",
      "ResponseType": "code",
      "SaveTokens": true,
      "ValidIssuer": "https://auth.tcis.local/realms/tcis",
      "ValidAudience": "account"
    },
    "TCIS": {
      "NameClaimType": "preferred_username",
      "RoleClaimType": "roles"
    }
  }
}

⚙️ Core Components

  • AddTOidc: Automatically configures OpenIdConnectOptions, attaching Event handlers like OnTokenValidated to properly map standard TCIS claims.
  • AddTJwtBearer: Automatically configures JwtBearerOptions used for APIs/Microservices.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.9 24 7/21/2026
1.0.0-rc.8 26 7/21/2026
1.0.0-rc.7 43 7/17/2026
1.0.0-rc.6 51 7/7/2026
1.0.0-rc.5 57 7/7/2026
1.0.0-rc.4 61 6/24/2026
1.0.0-rc.2 57 5/12/2026
1.0.0-rc.1 61 5/12/2026