Udap.Server 0.0.3-preview001

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.3-preview001                
NuGet\Install-Package Udap.Server -Version 0.0.3-preview001                
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.3-preview001" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Udap.Server --version 0.0.3-preview001                
#r "nuget: Udap.Server, 0.0.3-preview001"                
#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.3-preview001&prerelease

// Install Udap.Server as a Cake Tool
#tool nuget:?package=Udap.Server&version=0.0.3-preview001&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. 
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.3.96 111 11/6/2024
0.3.95 87 11/2/2024
0.3.94 89 10/31/2024
0.3.93 174 10/13/2024
0.3.92 85 10/13/2024
0.3.91 86 10/10/2024
0.3.89 85 10/10/2024
0.3.87 90 10/5/2024
0.3.86 89 10/5/2024
0.3.85 84 10/4/2024
0.3.84 92 10/3/2024
0.3.83 86 10/3/2024
0.3.82 106 9/20/2024
0.3.81 94 9/19/2024
0.3.80 85 9/19/2024
0.3.79 85 9/19/2024
0.3.78 74 9/19/2024
0.3.77 86 9/17/2024
0.3.76 92 9/17/2024
0.3.75 93 9/12/2024
0.3.74 113 9/12/2024
0.3.73 102 9/10/2024
0.3.72 119 9/7/2024
0.3.71 122 9/5/2024
0.3.70 107 9/5/2024
0.3.69 125 9/5/2024
0.3.68 107 9/4/2024
0.3.67 92 9/4/2024
0.3.66 88 9/4/2024
0.3.65 91 9/4/2024
0.3.64 89 9/2/2024
0.3.63 101 8/31/2024
0.3.62 93 8/29/2024
0.3.61 105 8/28/2024
0.3.60 89 8/2/2024
0.3.59 87 8/1/2024
0.3.58 92 8/1/2024
0.3.57 119 7/19/2024
0.3.56 91 7/19/2024
0.3.54 96 7/18/2024
0.3.53 94 7/15/2024
0.3.52 84 7/15/2024
0.3.51 95 7/12/2024
0.3.50 105 7/1/2024
0.3.49 102 7/1/2024
0.3.48 139 5/22/2024
0.3.47 135 5/15/2024
0.3.46 105 5/14/2024
0.3.45 117 5/12/2024
0.3.44 113 5/12/2024
0.3.43 122 5/12/2024
0.3.42 100 5/12/2024
0.3.41 123 5/6/2024
0.3.40 138 5/4/2024
0.3.39 71 5/1/2024
0.3.38 110 4/30/2024
0.3.37 124 4/11/2024
0.3.36 110 4/10/2024
0.3.35 117 4/9/2024
0.3.34 116 4/8/2024
0.3.33 112 4/7/2024
0.3.32 134 4/5/2024
0.3.31 112 4/4/2024
0.3.30 120 4/4/2024
0.3.29 126 4/3/2024
0.3.28 92 4/3/2024
0.3.27 121 4/2/2024
0.3.26 100 4/2/2024
0.3.25 122 4/2/2024
0.3.24 126 3/24/2024
0.3.22 142 3/6/2024
0.3.21 128 3/6/2024
0.3.20 102 3/5/2024
0.3.19 130 3/2/2024
0.3.18 148 3/2/2024
0.3.13 123 3/1/2024
0.3.12 126 2/24/2024
0.3.10 114 2/14/2024
0.3.8 125 2/11/2024
0.3.7 124 2/11/2024
0.3.6 127 2/10/2024
0.3.5 125 2/10/2024
0.3.4 128 2/10/2024
0.3.2 112 2/10/2024
0.3.0 129 1/31/2024
0.2.21 249 10/24/2023
0.2.20 111 10/23/2023
0.2.19 121 10/20/2023
0.2.18 130 10/11/2023
0.2.17 133 10/5/2023
0.2.16 141 9/21/2023
0.2.15 138 9/21/2023
0.2.14 136 9/20/2023
0.2.13 134 9/20/2023
0.2.12 116 9/20/2023
0.2.11 128 9/19/2023
0.2.10 162 9/13/2023
0.2.9 227 8/26/2023
0.2.8 146 8/18/2023
0.2.7 150 8/15/2023
0.2.6 152 8/12/2023
0.2.5 167 8/11/2023
0.2.4 151 8/10/2023
0.2.3 159 8/2/2023
0.2.2 140 8/1/2023
0.2.1 157 7/25/2023
0.2.0 161 7/16/2023
0.1.24 149 5/26/2023
0.1.23 163 5/22/2023
0.1.22 143 5/22/2023
0.1.21 134 5/21/2023
0.1.20 150 5/20/2023
0.1.17 132 5/9/2023
0.1.16 126 5/6/2023
0.1.15 142 5/4/2023
0.1.14 141 5/2/2023
0.1.12 141 5/1/2023
0.1.11 160 4/29/2023
0.1.9 169 4/29/2023
0.1.8 152 4/29/2023
0.1.7 157 4/28/2023
0.1.6 146 4/27/2023
0.1.5 142 4/27/2023
0.1.4 151 4/25/2023
0.1.3 169 4/23/2023
0.1.2 172 4/22/2023
0.1.1 161 4/22/2023
0.0.4-preview040 124 4/21/2023
0.0.4-preview039 137 4/13/2023
0.0.4-preview038 135 4/11/2023
0.0.4-preview037 130 4/7/2023
0.0.4-preview036 119 3/31/2023
0.0.4-preview035 113 3/31/2023
0.0.4-preview034 123 3/31/2023
0.0.4-preview033 126 3/30/2023
0.0.4-preview032 140 3/19/2023
0.0.4-preview029 131 3/18/2023
0.0.4-preview028 115 3/15/2023
0.0.4-preview027 134 3/13/2023
0.0.4-preview026 98 3/12/2023
0.0.4-preview025 109 3/10/2023
0.0.4-preview024 140 3/9/2023
0.0.4-preview022 128 3/9/2023
0.0.4-preview021 136 3/7/2023
0.0.4-preview020 137 3/7/2023
0.0.4-preview019 128 3/4/2023
0.0.4-preview018 136 3/4/2023
0.0.4-preview017 129 3/4/2023
0.0.4-preview016 134 3/1/2023
0.0.4-preview015 129 2/28/2023
0.0.4-preview014 137 2/23/2023
0.0.4-preview013 141 2/23/2023
0.0.4-preview012 139 2/21/2023
0.0.4-preview011 135 2/20/2023
0.0.4-preview010 134 2/20/2023
0.0.4-preview009 138 2/19/2023
0.0.4-preview008 121 2/14/2023
0.0.4-preview007 136 2/10/2023
0.0.4-preview006 137 2/8/2023
0.0.4-preview005 140 2/8/2023
0.0.4-preview004 120 2/7/2023
0.0.4-preview003 125 2/7/2023
0.0.4-preview002 146 2/7/2023
0.0.4-preview001 140 2/3/2023
0.0.4-preview000 148 2/2/2023
0.0.3-preview032 137 2/1/2023
0.0.3-preview031 134 2/1/2023
0.0.3-preview030 159 1/30/2023
0.0.3-preview029 141 1/21/2023
0.0.3-preview028 139 1/19/2023
0.0.3-preview027 133 1/18/2023
0.0.3-preview026 141 1/16/2023
0.0.3-preview025 148 1/15/2023
0.0.3-preview024 149 1/15/2023
0.0.3-preview020 135 1/15/2023
0.0.3-preview019 148 1/11/2023
0.0.3-preview018 153 1/11/2023
0.0.3-preview017 142 1/7/2023
0.0.3-preview016 137 1/7/2023
0.0.3-preview015 140 1/6/2023
0.0.3-preview014 133 1/6/2023
0.0.3-preview013 149 1/6/2023
0.0.3-preview012 148 1/6/2023
0.0.3-preview011 127 1/6/2023
0.0.3-preview010 148 1/3/2023
0.0.3-preview009 143 1/3/2023
0.0.3-preview008 143 1/2/2023
0.0.3-preview007 142 1/2/2023
0.0.3-preview006 138 1/2/2023
0.0.3-preview005 139 1/2/2023
0.0.3-preview004 135 1/1/2023
0.0.3-preview003 141 12/31/2022
0.0.3-preview002 172 12/28/2022
0.0.3-preview001 187 12/21/2022
0.0.3-preview000 139 11/29/2022
0.0.2-preview003 101 11/4/2022
0.0.2-preview002 110 11/4/2022
0.0.2-preview000 133 11/4/2022
0.0.1-preview3373625764 166 11/1/2022
0.0.1-preview002 139 11/4/2022
0.0.1-preview001 131 11/4/2022