AurorisNet.IdentityServer
1.2.0
See the version list below for details.
dotnet add package AurorisNet.IdentityServer --version 1.2.0
NuGet\Install-Package AurorisNet.IdentityServer -Version 1.2.0
<PackageReference Include="AurorisNet.IdentityServer" Version="1.2.0" />
<PackageVersion Include="AurorisNet.IdentityServer" Version="1.2.0" />
<PackageReference Include="AurorisNet.IdentityServer" />
paket add AurorisNet.IdentityServer --version 1.2.0
#r "nuget: AurorisNet.IdentityServer, 1.2.0"
#:package AurorisNet.IdentityServer@1.2.0
#addin nuget:?package=AurorisNet.IdentityServer&version=1.2.0
#tool nuget:?package=AurorisNet.IdentityServer&version=1.2.0
AurorisNet.IdentityServer
Adds OpenID Connect sign-in with Active Directory, Samba AD or FreeIPA accounts to your own ASP.NET Core 10 application, built on OpenIddict.
The package serves the discovery, signing-key, authorization and token endpoints beside your own routes. Negotiate, IIS Windows Authentication or a Kerberos-authenticating Apache or Nginx proxy verifies the browser's Kerberos ticket. The server then reads the person's profile and direct group memberships from the directory and issues an ID token and an access token to the application. It accepts the authorization code flow, with PKCE when the client sends it, and the implicit and hybrid flows. It issues no refresh tokens: the application starts a new sign-in to get fresh tokens.
It runs on Windows and Linux. The same server is available as a standalone application in the repository.
Install
dotnet add package AurorisNet.IdentityServer
The package installs IdentityServer.Core.dll and the AurorisNet.ActiveDirectory package. The
namespace is IdentityServer.
Use
Program.cs:
using IdentityServer;
IdentityServerHost.Run<Startup>(args);
Startup.cs:
using IdentityServer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
public class Startup(IConfiguration configuration)
{
public void ConfigureServices(IServiceCollection services)
{
services.AddIdentityServer(configuration);
services.AddControllers();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseIdentityServer(env);
app.UseEndpoints(endpoints => endpoints.MapControllers());
}
}
IdentityServerHost.Run reads appsettings.json, an optional appsettings.Local.json,
environment variables and command-line arguments, in that order, and logs to the console and to
daily files. It reads no appsettings.{Environment}.json file and no user secrets.
UseIdentityServer adds routing, CORS, authentication and authorization. Map your endpoints
after it. Every routed endpoint requires sign-in unless it carries [AllowAnonymous] or names
its own authentication scheme.
Settings
Put the settings in the IdentityServer section of your application's appsettings.json:
{
"IdentityServer": {
"ServerUri": "https://identity.example.com",
"PersistKeys": true,
"DataPath": "C:\\IdentityServerData\\keys",
"Hosts": [ "https://app.example.com" ],
"Clients": [ { "ClientId": "example-app" } ],
"Groups": [ "^Example App Users$" ]
}
}
Hostslists where sign-in results may be sent. The redirect check compares the hostname only, and with no entries every authorization request is rejected.Clientslists the applications that may request sign-in. An empty list accepts any client ID.PersistKeyskeeps the token keys across restarts. On Linux it needsKeyProtectionPassword.- On a domain-joined Windows server the example is complete. On Linux, add a
Directorysection for Active Directory, Samba AD or FreeIPA.
After the application starts, open /.well-known/openid-configuration to see the discovery
document.
Documentation
- Embedding the core
- Configuration
- Directory providers
- Windows and IIS
- Linux
- Apache and Nginx
- Verification
- Troubleshooting
- All documentation, source and issues
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- AurorisNet.ActiveDirectory (>= 1.2.0)
- Microsoft.AspNetCore.Authentication.Negotiate (>= 10.0.15)
- OpenIddict.Server.AspNetCore (>= 7.9.0)
- OpenIddict.Validation.AspNetCore (>= 7.9.0)
- OpenIddict.Validation.ServerIntegration (>= 7.9.0)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Sinks.File (>= 7.0.0)
- System.DirectoryServices.Protocols (>= 11.0.0)
- System.Security.Cryptography.ProtectedData (>= 11.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AurorisNet.IdentityServer:
| Package | Downloads |
|---|---|
|
AurorisNet.Umbraco.IdentityServer.SSO
Single sign-on for Umbraco 18 backoffice users and members through an OpenID Connect identity server: the site's own embedded IdentityServer with Windows authentication, or an external one. Adds the login buttons and automatic redirect, a password fallback when the server is unreachable, account seeding from configuration, and retirement of deleted accounts that have signed in. |
GitHub repositories
This package is not used by any popular GitHub repositories.