Udap.Server 0.0.4-preview000

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-preview000
                    
NuGet\Install-Package Udap.Server -Version 0.0.4-preview000
                    
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-preview000" />
                    
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-preview000" />
                    
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-preview000
                    
#r "nuget: Udap.Server, 0.0.4-preview000"
                    
#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-preview000&prerelease
                    
Install Udap.Server as a Cake Addin
#tool nuget:?package=Udap.Server&version=0.0.4-preview000&prerelease
                    
Install Udap.Server 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.8 0 6/3/2025
0.4.7 195 4/18/2025
0.4.6 289 3/17/2025
0.4.5 426 3/4/2025
0.4.4 191 1/15/2025
0.4.3 132 1/14/2025
0.4.2 132 1/14/2025
0.4.1 275 1/13/2025
0.4.0 166 12/14/2024
0.3.96 171 11/6/2024
0.3.95 130 11/2/2024
0.3.94 125 10/31/2024
0.3.93 289 10/13/2024
0.3.92 112 10/13/2024
0.3.91 115 10/10/2024
0.3.89 113 10/10/2024
0.3.87 115 10/5/2024
0.3.86 115 10/5/2024
0.3.85 106 10/4/2024
0.3.84 119 10/3/2024
0.3.83 116 10/3/2024
0.3.82 136 9/20/2024
0.3.81 128 9/19/2024
0.3.80 110 9/19/2024
0.3.79 115 9/19/2024
0.3.78 98 9/19/2024
0.3.77 112 9/17/2024
0.3.76 114 9/17/2024
0.3.75 120 9/12/2024
0.3.74 135 9/12/2024
0.3.73 126 9/10/2024
0.3.72 149 9/7/2024
0.3.71 145 9/5/2024
0.3.70 131 9/5/2024
0.3.69 149 9/5/2024
0.3.68 131 9/4/2024
0.3.67 120 9/4/2024
0.3.66 112 9/4/2024
0.3.65 115 9/4/2024
0.3.64 118 9/2/2024
0.3.63 126 8/31/2024
0.3.62 122 8/29/2024
0.3.61 131 8/28/2024
0.3.60 113 8/2/2024
0.3.59 112 8/1/2024
0.3.58 115 8/1/2024
0.3.57 147 7/19/2024
0.3.56 117 7/19/2024
0.3.54 121 7/18/2024
0.3.53 120 7/15/2024
0.3.52 108 7/15/2024
0.3.51 122 7/12/2024
0.3.50 133 7/1/2024
0.3.49 130 7/1/2024
0.3.48 163 5/22/2024
0.3.47 157 5/15/2024
0.3.46 127 5/14/2024
0.3.45 142 5/12/2024
0.3.44 137 5/12/2024
0.3.43 145 5/12/2024
0.3.42 123 5/12/2024
0.3.41 145 5/6/2024
0.3.40 161 5/4/2024
0.3.39 93 5/1/2024
0.3.38 135 4/30/2024
0.3.37 146 4/11/2024
0.3.36 140 4/10/2024
0.3.35 140 4/9/2024
0.3.34 139 4/8/2024
0.3.33 133 4/7/2024
0.3.32 155 4/5/2024
0.3.31 133 4/4/2024
0.3.30 145 4/4/2024
0.3.29 145 4/3/2024
0.3.28 115 4/3/2024
0.3.27 142 4/2/2024
0.3.26 120 4/2/2024
0.3.25 142 4/2/2024
0.3.24 150 3/24/2024
0.3.22 164 3/6/2024
0.3.21 152 3/6/2024
0.3.20 122 3/5/2024
0.3.19 150 3/2/2024
0.3.18 170 3/2/2024
0.3.13 146 3/1/2024
0.3.12 149 2/24/2024
0.3.10 138 2/14/2024
0.3.8 151 2/11/2024
0.3.7 149 2/11/2024
0.3.6 153 2/10/2024
0.3.5 149 2/10/2024
0.3.4 151 2/10/2024
0.3.2 137 2/10/2024
0.3.0 149 1/31/2024
0.2.21 260 10/24/2023
0.2.20 126 10/23/2023
0.2.19 135 10/20/2023
0.2.18 141 10/11/2023
0.2.17 145 10/5/2023
0.2.16 153 9/21/2023
0.2.15 151 9/21/2023
0.2.14 148 9/20/2023
0.2.13 147 9/20/2023
0.2.12 128 9/20/2023
0.2.11 142 9/19/2023
0.2.10 174 9/13/2023
0.2.9 241 8/26/2023
0.2.8 163 8/18/2023
0.2.7 167 8/15/2023
0.2.6 168 8/12/2023
0.2.5 185 8/11/2023
0.2.4 167 8/10/2023
0.2.3 176 8/2/2023
0.2.2 158 8/1/2023
0.2.1 173 7/25/2023
0.2.0 178 7/16/2023
0.1.24 171 5/26/2023
0.1.23 187 5/22/2023
0.1.22 165 5/22/2023
0.1.21 157 5/21/2023
0.1.20 172 5/20/2023
0.1.17 159 5/9/2023
0.1.16 151 5/6/2023
0.1.15 167 5/4/2023
0.1.14 167 5/2/2023
0.1.12 166 5/1/2023
0.1.11 185 4/29/2023
0.1.9 194 4/29/2023
0.1.8 178 4/29/2023
0.1.7 184 4/28/2023
0.1.6 171 4/27/2023
0.1.5 168 4/27/2023
0.1.4 176 4/25/2023
0.1.3 193 4/23/2023
0.1.2 198 4/22/2023
0.1.1 185 4/22/2023
0.0.4-preview040 145 4/21/2023
0.0.4-preview039 158 4/13/2023
0.0.4-preview038 156 4/11/2023
0.0.4-preview037 154 4/7/2023
0.0.4-preview036 143 3/31/2023
0.0.4-preview035 135 3/31/2023
0.0.4-preview034 144 3/31/2023
0.0.4-preview033 146 3/30/2023
0.0.4-preview032 162 3/19/2023
0.0.4-preview029 152 3/18/2023
0.0.4-preview028 135 3/15/2023
0.0.4-preview027 155 3/13/2023
0.0.4-preview026 119 3/12/2023
0.0.4-preview025 131 3/10/2023
0.0.4-preview024 162 3/9/2023
0.0.4-preview022 149 3/9/2023
0.0.4-preview021 158 3/7/2023
0.0.4-preview020 158 3/7/2023
0.0.4-preview019 149 3/4/2023
0.0.4-preview018 157 3/4/2023
0.0.4-preview017 150 3/4/2023
0.0.4-preview016 155 3/1/2023
0.0.4-preview015 151 2/28/2023
0.0.4-preview014 159 2/23/2023
0.0.4-preview013 163 2/23/2023
0.0.4-preview012 159 2/21/2023
0.0.4-preview011 159 2/20/2023
0.0.4-preview010 156 2/20/2023
0.0.4-preview009 158 2/19/2023
0.0.4-preview008 143 2/14/2023
0.0.4-preview007 157 2/10/2023
0.0.4-preview006 159 2/8/2023
0.0.4-preview005 162 2/8/2023
0.0.4-preview004 142 2/7/2023
0.0.4-preview003 147 2/7/2023
0.0.4-preview002 169 2/7/2023
0.0.4-preview001 161 2/3/2023
0.0.4-preview000 169 2/2/2023
0.0.3-preview032 160 2/1/2023
0.0.3-preview031 156 2/1/2023
0.0.3-preview030 180 1/30/2023
0.0.3-preview029 163 1/21/2023
0.0.3-preview028 160 1/19/2023
0.0.3-preview027 154 1/18/2023
0.0.3-preview026 163 1/16/2023
0.0.3-preview025 170 1/15/2023
0.0.3-preview024 171 1/15/2023
0.0.3-preview020 158 1/15/2023
0.0.3-preview019 170 1/11/2023
0.0.3-preview018 176 1/11/2023
0.0.3-preview017 165 1/7/2023
0.0.3-preview016 162 1/7/2023
0.0.3-preview015 164 1/6/2023
0.0.3-preview014 161 1/6/2023
0.0.3-preview013 171 1/6/2023
0.0.3-preview012 170 1/6/2023
0.0.3-preview011 150 1/6/2023
0.0.3-preview010 171 1/3/2023
0.0.3-preview009 167 1/3/2023
0.0.3-preview008 165 1/2/2023
0.0.3-preview007 165 1/2/2023
0.0.3-preview006 161 1/2/2023
0.0.3-preview005 162 1/2/2023
0.0.3-preview004 157 1/1/2023
0.0.3-preview003 163 12/31/2022
0.0.3-preview002 194 12/28/2022
0.0.3-preview001 210 12/21/2022
0.0.3-preview000 161 11/29/2022
0.0.2-preview003 128 11/4/2022
0.0.2-preview002 132 11/4/2022
0.0.2-preview000 159 11/4/2022
0.0.1-preview3373625764 194 11/1/2022
0.0.1-preview002 164 11/4/2022
0.0.1-preview001 158 11/4/2022