Udap.Server 0.0.3-preview016

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-preview016                
NuGet\Install-Package Udap.Server -Version 0.0.3-preview016                
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-preview016" />                
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-preview016                
#r "nuget: Udap.Server, 0.0.3-preview016"                
#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-preview016&prerelease

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