Udap.Server 0.0.4-preview039

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-preview039                
NuGet\Install-Package Udap.Server -Version 0.0.4-preview039                
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-preview039" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Udap.Server --version 0.0.4-preview039                
#r "nuget: Udap.Server, 0.0.4-preview039"                
#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.
// Install Udap.Server as a Cake Addin
#addin nuget:?package=Udap.Server&version=0.0.4-preview039&prerelease

// Install Udap.Server as a Cake Tool
#tool nuget:?package=Udap.Server&version=0.0.4-preview039&prerelease                

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. 
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.0 131 12/14/2024
0.3.96 153 11/6/2024
0.3.95 108 11/2/2024
0.3.94 106 10/31/2024
0.3.93 262 10/13/2024
0.3.92 96 10/13/2024
0.3.91 96 10/10/2024
0.3.89 95 10/10/2024
0.3.87 98 10/5/2024
0.3.86 99 10/5/2024
0.3.85 92 10/4/2024
0.3.84 100 10/3/2024
0.3.83 98 10/3/2024
0.3.82 114 9/20/2024
0.3.81 104 9/19/2024
0.3.80 95 9/19/2024
0.3.79 100 9/19/2024
0.3.78 82 9/19/2024
0.3.77 94 9/17/2024
0.3.76 100 9/17/2024
0.3.75 106 9/12/2024
0.3.74 121 9/12/2024
0.3.73 112 9/10/2024
0.3.72 129 9/7/2024
0.3.71 132 9/5/2024
0.3.70 115 9/5/2024
0.3.69 133 9/5/2024
0.3.68 117 9/4/2024
0.3.67 104 9/4/2024
0.3.66 98 9/4/2024
0.3.65 99 9/4/2024
0.3.64 99 9/2/2024
0.3.63 111 8/31/2024
0.3.62 107 8/29/2024
0.3.61 117 8/28/2024
0.3.60 100 8/2/2024
0.3.59 99 8/1/2024
0.3.58 100 8/1/2024
0.3.57 132 7/19/2024
0.3.56 104 7/19/2024
0.3.54 107 7/18/2024
0.3.53 106 7/15/2024
0.3.52 94 7/15/2024
0.3.51 105 7/12/2024
0.3.50 113 7/1/2024
0.3.49 110 7/1/2024
0.3.48 147 5/22/2024
0.3.47 143 5/15/2024
0.3.46 115 5/14/2024
0.3.45 127 5/12/2024
0.3.44 121 5/12/2024
0.3.43 130 5/12/2024
0.3.42 108 5/12/2024
0.3.41 131 5/6/2024
0.3.40 146 5/4/2024
0.3.39 79 5/1/2024
0.3.38 118 4/30/2024
0.3.37 130 4/11/2024
0.3.36 118 4/10/2024
0.3.35 127 4/9/2024
0.3.34 126 4/8/2024
0.3.33 120 4/7/2024
0.3.32 142 4/5/2024
0.3.31 118 4/4/2024
0.3.30 132 4/4/2024
0.3.29 132 4/3/2024
0.3.28 100 4/3/2024
0.3.27 127 4/2/2024
0.3.26 106 4/2/2024
0.3.25 128 4/2/2024
0.3.24 136 3/24/2024
0.3.22 148 3/6/2024
0.3.21 136 3/6/2024
0.3.20 108 3/5/2024
0.3.19 136 3/2/2024
0.3.18 154 3/2/2024
0.3.13 129 3/1/2024
0.3.12 134 2/24/2024
0.3.10 124 2/14/2024
0.3.8 135 2/11/2024
0.3.7 134 2/11/2024
0.3.6 137 2/10/2024
0.3.5 135 2/10/2024
0.3.4 138 2/10/2024
0.3.2 122 2/10/2024
0.3.0 135 1/31/2024
0.2.21 255 10/24/2023
0.2.20 119 10/23/2023
0.2.19 129 10/20/2023
0.2.18 136 10/11/2023
0.2.17 139 10/5/2023
0.2.16 147 9/21/2023
0.2.15 144 9/21/2023
0.2.14 142 9/20/2023
0.2.13 140 9/20/2023
0.2.12 122 9/20/2023
0.2.11 136 9/19/2023
0.2.10 168 9/13/2023
0.2.9 233 8/26/2023
0.2.8 152 8/18/2023
0.2.7 156 8/15/2023
0.2.6 158 8/12/2023
0.2.5 175 8/11/2023
0.2.4 157 8/10/2023
0.2.3 168 8/2/2023
0.2.2 147 8/1/2023
0.2.1 164 7/25/2023
0.2.0 168 7/16/2023
0.1.24 156 5/26/2023
0.1.23 170 5/22/2023
0.1.22 150 5/22/2023
0.1.21 142 5/21/2023
0.1.20 157 5/20/2023
0.1.17 139 5/9/2023
0.1.16 135 5/6/2023
0.1.15 151 5/4/2023
0.1.14 150 5/2/2023
0.1.12 150 5/1/2023
0.1.11 169 4/29/2023
0.1.9 176 4/29/2023
0.1.8 161 4/29/2023
0.1.7 166 4/28/2023
0.1.6 153 4/27/2023
0.1.5 151 4/27/2023
0.1.4 160 4/25/2023
0.1.3 176 4/23/2023
0.1.2 179 4/22/2023
0.1.1 168 4/22/2023
0.0.4-preview040 131 4/21/2023
0.0.4-preview039 144 4/13/2023
0.0.4-preview038 142 4/11/2023
0.0.4-preview037 137 4/7/2023
0.0.4-preview036 126 3/31/2023
0.0.4-preview035 120 3/31/2023
0.0.4-preview034 128 3/31/2023
0.0.4-preview033 131 3/30/2023
0.0.4-preview032 144 3/19/2023
0.0.4-preview029 138 3/18/2023
0.0.4-preview028 119 3/15/2023
0.0.4-preview027 140 3/13/2023
0.0.4-preview026 104 3/12/2023
0.0.4-preview025 115 3/10/2023
0.0.4-preview024 146 3/9/2023
0.0.4-preview022 132 3/9/2023
0.0.4-preview021 143 3/7/2023
0.0.4-preview020 143 3/7/2023
0.0.4-preview019 134 3/4/2023
0.0.4-preview018 142 3/4/2023
0.0.4-preview017 133 3/4/2023
0.0.4-preview016 139 3/1/2023
0.0.4-preview015 135 2/28/2023
0.0.4-preview014 142 2/23/2023
0.0.4-preview013 148 2/23/2023
0.0.4-preview012 144 2/21/2023
0.0.4-preview011 144 2/20/2023
0.0.4-preview010 139 2/20/2023
0.0.4-preview009 143 2/19/2023
0.0.4-preview008 126 2/14/2023
0.0.4-preview007 141 2/10/2023
0.0.4-preview006 142 2/8/2023
0.0.4-preview005 145 2/8/2023
0.0.4-preview004 125 2/7/2023
0.0.4-preview003 130 2/7/2023
0.0.4-preview002 152 2/7/2023
0.0.4-preview001 145 2/3/2023
0.0.4-preview000 153 2/2/2023
0.0.3-preview032 142 2/1/2023
0.0.3-preview031 139 2/1/2023
0.0.3-preview030 164 1/30/2023
0.0.3-preview029 146 1/21/2023
0.0.3-preview028 144 1/19/2023
0.0.3-preview027 138 1/18/2023
0.0.3-preview026 146 1/16/2023
0.0.3-preview025 153 1/15/2023
0.0.3-preview024 154 1/15/2023
0.0.3-preview020 140 1/15/2023
0.0.3-preview019 153 1/11/2023
0.0.3-preview018 158 1/11/2023
0.0.3-preview017 147 1/7/2023
0.0.3-preview016 142 1/7/2023
0.0.3-preview015 145 1/6/2023
0.0.3-preview014 138 1/6/2023
0.0.3-preview013 154 1/6/2023
0.0.3-preview012 153 1/6/2023
0.0.3-preview011 132 1/6/2023
0.0.3-preview010 153 1/3/2023
0.0.3-preview009 148 1/3/2023
0.0.3-preview008 148 1/2/2023
0.0.3-preview007 147 1/2/2023
0.0.3-preview006 143 1/2/2023
0.0.3-preview005 144 1/2/2023
0.0.3-preview004 140 1/1/2023
0.0.3-preview003 146 12/31/2022
0.0.3-preview002 177 12/28/2022
0.0.3-preview001 192 12/21/2022
0.0.3-preview000 144 11/29/2022
0.0.2-preview003 110 11/4/2022
0.0.2-preview002 115 11/4/2022
0.0.2-preview000 138 11/4/2022
0.0.1-preview3373625764 171 11/1/2022
0.0.1-preview002 144 11/4/2022
0.0.1-preview001 136 11/4/2022