Udap.Server 0.0.4-preview024

This is a prerelease version of Udap.Server.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Udap.Server --version 0.0.4-preview024
                    
NuGet\Install-Package Udap.Server -Version 0.0.4-preview024
                    
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="Udap.Server" Version="0.0.4-preview024" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Udap.Server" Version="0.0.4-preview024" />
                    
Directory.Packages.props
<PackageReference Include="Udap.Server" />
                    
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 Udap.Server --version 0.0.4-preview024
                    
#r "nuget: Udap.Server, 0.0.4-preview024"
                    
#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.
#addin nuget:?package=Udap.Server&version=0.0.4-preview024&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Udap.Server&version=0.0.4-preview024&prerelease
                    
Install as a Cake Tool

Udap.Server

UDAP logo

📦 This package

This package is intended to be used with Duende's Identity Server. Duende must be licensed if you are using it for anything more than testing and you make more than 1 million dollars a year. I am willing to build samples using other identity providers. Keep in mind Udap.Server is meant to add auto registration only. Then it relies on Identity Server for identity rather than build a complete identity provider server. There is great value Duende provides that would take a very long time to get correct.

This package contains a few extension methods and two endpoints. The first endpoint is an UDAP metadata endpoint, implementing Duende's IEndpointHandler interface allowing /.well-known/udap to render metadata. The only thing of interest in this endpoint is the registration_endpoint which points to the next endpoint, UdapDynamicClientRegistrationEndpoint. This code is a simple endpoint called as a delegate using the dotnet minimal api technique.

Program.cs could look like this.

TODO Work to do here to demonstrate how to use.

  • Update readme
  • Instructions on creating database. dotnet run /seed from Udap.Idp.Admin
  • Need to finish loading root CAs into database
  • Add and test other DBs like SQL, PostgreSql and CockroachDB. Maybe Windows Store? 😏

using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Serilog;
using Udap.Server;
using Udap.Server.Extensions;
using Udap.Server.Registration;

namespace Udap.Idp;

internal static class HostingExtensions
{
    public static WebApplication ConfigureServices(this WebApplicationBuilder builder)
    {
        if (! int.TryParse(Environment.GetEnvironmentVariable("ASPNETCORE_HTTPS_PORT"), out int sslPort))
        {
            sslPort = 5002;
        }

        var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");

        // uncomment if you want to add a UI
        builder.Services.AddRazorPages();

        var migrationsAssembly = typeof(Program).Assembly.GetName().Name;
        builder.Services.AddIdentityServer(options =>
            {
                // https://docs.duendesoftware.com/identityserver/v6/fundamentals/resources/api_scopes#authorization-based-on-scopes
                options.EmitStaticAudienceClaim = true;
            })
            .AddConfigurationStore(options =>
            {
                options.ConfigureDbContext = b => b.UseSqlite(connectionString,
                    sql => sql.MigrationsAssembly(migrationsAssembly));
            })
            .AddOperationalStore(options =>
            {
                options.ConfigureDbContext = b => b.UseSqlite(connectionString,
                    sql => sql.MigrationsAssembly(migrationsAssembly));
            })
            .AddInMemoryIdentityResources(Config.IdentityResources)
            .AddInMemoryApiScopes(Config.ApiScopes)
            .AddInMemoryClients(Config.Clients)
            //TODO remove
            .AddTestUsers(TestUsers.Users)
            .AddUdapDiscovery()
            .AddUdapServerConfiguration()
            .AddUdapConfigurationStore(options =>
            {
                options.UdapDbContext = b => b.UseSqlite(connectionString,
                    sql => sql.MigrationsAssembly(typeof(UdapDiscoveryEndpoint).Assembly.FullName));
            });

        return builder.Build();
    }
    
    public static WebApplication ConfigurePipeline(this WebApplication app)
    { 
        app.UseSerilogRequestLogging();
    
        if (app.Environment.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        // uncomment if you want to add a UI
        app.UseStaticFiles();
        app.UseRouting();
            
        app.UseIdentityServer();

        app.MapPost("/connect/register", async (HttpContext httpContext, [FromServices] UdapDynamicClientRegistrationEndpoint endpoint) =>
        {
            //TODO:  Tests and response codes needed...    httpContext.Response
            await endpoint.Process(httpContext);
        })
        .AllowAnonymous()
        .Produces(StatusCodes.Status201Created)
        .Produces(StatusCodes.Status401Unauthorized);

        // uncomment if you want to add a UI
        app.UseAuthorization();
        app.MapRazorPages().RequireAuthorization();

        return app;
    }
}


Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Udap.Server:

Package Downloads
Udap.UI

Package is a part of the UDAP reference implementation for .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.11 216 6/13/2025
0.4.10 282 6/12/2025
0.4.9 293 6/12/2025
0.4.8 142 6/3/2025
0.4.7 204 4/18/2025
0.4.6 297 3/17/2025
0.4.5 434 3/4/2025
0.4.4 195 1/15/2025
0.4.3 138 1/14/2025
0.4.2 139 1/14/2025
0.4.1 280 1/13/2025
0.4.0 170 12/14/2024
0.3.96 175 11/6/2024
0.3.95 134 11/2/2024
0.3.94 133 10/31/2024
0.3.93 295 10/13/2024
0.3.92 116 10/13/2024
0.3.91 121 10/10/2024
0.3.89 118 10/10/2024
0.3.87 123 10/5/2024
0.3.86 120 10/5/2024
0.3.85 112 10/4/2024
0.3.84 125 10/3/2024
0.3.83 121 10/3/2024
0.3.82 151 9/20/2024
0.3.81 135 9/19/2024
0.3.80 122 9/19/2024
0.3.79 122 9/19/2024
0.3.78 104 9/19/2024
0.3.77 120 9/17/2024
0.3.76 119 9/17/2024
0.3.75 125 9/12/2024
0.3.74 141 9/12/2024
0.3.73 131 9/10/2024
0.3.72 154 9/7/2024
0.3.71 151 9/5/2024
0.3.70 138 9/5/2024
0.3.69 153 9/5/2024
0.3.68 135 9/4/2024
0.3.67 127 9/4/2024
0.3.66 118 9/4/2024
0.3.65 120 9/4/2024
0.3.64 122 9/2/2024
0.3.63 130 8/31/2024
0.3.62 127 8/29/2024
0.3.61 138 8/28/2024
0.3.60 117 8/2/2024
0.3.59 117 8/1/2024
0.3.58 120 8/1/2024
0.3.57 152 7/19/2024
0.3.56 121 7/19/2024
0.3.54 126 7/18/2024
0.3.53 125 7/15/2024
0.3.52 120 7/15/2024
0.3.51 127 7/12/2024
0.3.50 138 7/1/2024
0.3.49 135 7/1/2024
0.3.48 170 5/22/2024
0.3.47 163 5/15/2024
0.3.46 134 5/14/2024
0.3.45 146 5/12/2024
0.3.44 143 5/12/2024
0.3.43 152 5/12/2024
0.3.42 133 5/12/2024
0.3.41 150 5/6/2024
0.3.40 170 5/4/2024
0.3.39 97 5/1/2024
0.3.38 139 4/30/2024
0.3.37 151 4/11/2024
0.3.36 148 4/10/2024
0.3.35 145 4/9/2024
0.3.34 145 4/8/2024
0.3.33 138 4/7/2024
0.3.32 162 4/5/2024
0.3.31 140 4/4/2024
0.3.30 150 4/4/2024
0.3.29 150 4/3/2024
0.3.28 121 4/3/2024
0.3.27 146 4/2/2024
0.3.26 124 4/2/2024
0.3.25 147 4/2/2024
0.3.24 154 3/24/2024
0.3.22 169 3/6/2024
0.3.21 157 3/6/2024
0.3.20 126 3/5/2024
0.3.19 154 3/2/2024
0.3.18 174 3/2/2024
0.3.13 151 3/1/2024
0.3.12 153 2/24/2024
0.3.10 144 2/14/2024
0.3.8 155 2/11/2024
0.3.7 154 2/11/2024
0.3.6 157 2/10/2024
0.3.5 153 2/10/2024
0.3.4 155 2/10/2024
0.3.2 142 2/10/2024
0.3.0 153 1/31/2024
0.2.21 265 10/24/2023
0.2.20 130 10/23/2023
0.2.19 141 10/20/2023
0.2.18 148 10/11/2023
0.2.17 151 10/5/2023
0.2.16 156 9/21/2023
0.2.15 155 9/21/2023
0.2.14 151 9/20/2023
0.2.13 152 9/20/2023
0.2.12 131 9/20/2023
0.2.11 145 9/19/2023
0.2.10 178 9/13/2023
0.2.9 246 8/26/2023
0.2.8 169 8/18/2023
0.2.7 171 8/15/2023
0.2.6 172 8/12/2023
0.2.5 189 8/11/2023
0.2.4 173 8/10/2023
0.2.3 182 8/2/2023
0.2.2 164 8/1/2023
0.2.1 180 7/25/2023
0.2.0 186 7/16/2023
0.1.24 177 5/26/2023
0.1.23 196 5/22/2023
0.1.22 170 5/22/2023
0.1.21 163 5/21/2023
0.1.20 181 5/20/2023
0.1.17 165 5/9/2023
0.1.16 157 5/6/2023
0.1.15 172 5/4/2023
0.1.14 171 5/2/2023
0.1.12 174 5/1/2023
0.1.11 192 4/29/2023
0.1.9 200 4/29/2023
0.1.8 185 4/29/2023
0.1.7 191 4/28/2023
0.1.6 177 4/27/2023
0.1.5 175 4/27/2023
0.1.4 181 4/25/2023
0.1.3 200 4/23/2023
0.1.2 203 4/22/2023
0.1.1 192 4/22/2023
0.0.4-preview040 150 4/21/2023
0.0.4-preview039 164 4/13/2023
0.0.4-preview038 163 4/11/2023
0.0.4-preview037 161 4/7/2023
0.0.4-preview036 148 3/31/2023
0.0.4-preview035 141 3/31/2023
0.0.4-preview034 156 3/31/2023
0.0.4-preview033 155 3/30/2023
0.0.4-preview032 172 3/19/2023
0.0.4-preview029 158 3/18/2023
0.0.4-preview028 143 3/15/2023
0.0.4-preview027 161 3/13/2023
0.0.4-preview026 128 3/12/2023
0.0.4-preview025 136 3/10/2023
0.0.4-preview024 168 3/9/2023
0.0.4-preview022 155 3/9/2023
0.0.4-preview021 164 3/7/2023
0.0.4-preview020 165 3/7/2023
0.0.4-preview019 157 3/4/2023
0.0.4-preview018 168 3/4/2023
0.0.4-preview017 159 3/4/2023
0.0.4-preview016 163 3/1/2023
0.0.4-preview015 161 2/28/2023
0.0.4-preview014 167 2/23/2023
0.0.4-preview013 173 2/23/2023
0.0.4-preview012 168 2/21/2023
0.0.4-preview011 166 2/20/2023
0.0.4-preview010 166 2/20/2023
0.0.4-preview009 163 2/19/2023
0.0.4-preview008 148 2/14/2023
0.0.4-preview007 161 2/10/2023
0.0.4-preview006 167 2/8/2023
0.0.4-preview005 173 2/8/2023
0.0.4-preview004 151 2/7/2023
0.0.4-preview003 153 2/7/2023
0.0.4-preview002 175 2/7/2023
0.0.4-preview001 168 2/3/2023
0.0.4-preview000 183 2/2/2023
0.0.3-preview032 166 2/1/2023
0.0.3-preview031 160 2/1/2023
0.0.3-preview030 187 1/30/2023
0.0.3-preview029 169 1/21/2023
0.0.3-preview028 167 1/19/2023
0.0.3-preview027 160 1/18/2023
0.0.3-preview026 169 1/16/2023
0.0.3-preview025 178 1/15/2023
0.0.3-preview024 178 1/15/2023
0.0.3-preview020 165 1/15/2023
0.0.3-preview019 176 1/11/2023
0.0.3-preview018 180 1/11/2023
0.0.3-preview017 177 1/7/2023
0.0.3-preview016 172 1/7/2023
0.0.3-preview015 168 1/6/2023
0.0.3-preview014 167 1/6/2023
0.0.3-preview013 179 1/6/2023
0.0.3-preview012 177 1/6/2023
0.0.3-preview011 154 1/6/2023
0.0.3-preview010 182 1/3/2023
0.0.3-preview009 173 1/3/2023
0.0.3-preview008 170 1/2/2023
0.0.3-preview007 174 1/2/2023
0.0.3-preview006 166 1/2/2023
0.0.3-preview005 166 1/2/2023
0.0.3-preview004 163 1/1/2023
0.0.3-preview003 173 12/31/2022
0.0.3-preview002 200 12/28/2022
0.0.3-preview001 220 12/21/2022
0.0.3-preview000 169 11/29/2022
0.0.2-preview003 135 11/4/2022
0.0.2-preview002 144 11/4/2022
0.0.2-preview000 163 11/4/2022
0.0.1-preview3373625764 203 11/1/2022
0.0.1-preview002 169 11/4/2022
0.0.1-preview001 163 11/4/2022