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