Nabs.Launchpad.Core.Portal 10.0.209

Prefix Reserved
dotnet add package Nabs.Launchpad.Core.Portal --version 10.0.209
                    
NuGet\Install-Package Nabs.Launchpad.Core.Portal -Version 10.0.209
                    
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="Nabs.Launchpad.Core.Portal" Version="10.0.209" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.Portal" Version="10.0.209" />
                    
Directory.Packages.props
<PackageReference Include="Nabs.Launchpad.Core.Portal" />
                    
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 Nabs.Launchpad.Core.Portal --version 10.0.209
                    
#r "nuget: Nabs.Launchpad.Core.Portal, 10.0.209"
                    
#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.
#:package Nabs.Launchpad.Core.Portal@10.0.209
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nabs.Launchpad.Core.Portal&version=10.0.209
                    
Install as a Cake Addin
#tool nuget:?package=Nabs.Launchpad.Core.Portal&version=10.0.209
                    
Install as a Cake Tool

Nabs Launchpad Core Portal Library

A comprehensive .NET 10 library for building Blazor Server portal applications with authentication, user context management, and service configuration.

Overview

The Nabs.Launchpad.Core.Portal library provides essential infrastructure for creating enterprise-grade Blazor Server portal applications. It includes JWT authentication, user context management, middleware pipeline configuration, and service registration helpers.

Key Features

  • Blazor Server Components: Pre-configured setup for interactive server-side Blazor applications
  • JWT Authentication: Complete JWT Bearer token authentication with configurable options
  • User Context Management: Automatic user context creation and injection from HTTP context
  • Middleware Pipeline: Built-in middleware for user context extraction and management
  • Localization Support: Multi-culture support with en-NZ, en-US, af, and mi locales
  • Service Defaults Integration: Seamless integration with Nabs.Launchpad.Core.ServiceDefaults
  • Portal Context: Configurable portal settings and base path support
  • MVVM Messaging: Integrated CommunityToolkit.Mvvm messaging support

Dependencies

This library depends on:

  • Nabs.Launchpad.Core.Context - User and portal context definitions
  • Nabs.Launchpad.Core.Interfaces - Core interfaces and contracts
  • Nabs.Launchpad.Core.ServiceDefaults - Default service configurations
  • Nabs.Launchpad.Ui.Shell - UI shell components and layouts
  • Microsoft.AspNetCore.Authentication.JwtBearer - JWT authentication support

Installation

dotnet add package Nabs.Launchpad.Core.Portal

Quick Start

1. Configure Portal Services

var builder = WebApplication.CreateBuilder(args);

builder.AddPortalServices(options =>
{
    options.PortalName = "My Portal";
    options.PortalContext = new PortalContext
    {
        PortalBasePath = "/myportal"
    };
    options.AdditionalAssemblies = [typeof(MyComponent).Assembly];
    options.DisableAuth = false; // Enable authentication
    options.AuthIssuer = "https://myauth.example.com";
    options.AuthAudience = "my-portal-audience";
    options.AuthKey = "your-secret-key-here";
});

2. Configure Portal Application

var app = builder.Build();

app.UsePortalServices<App>(); // App is your root Blazor component

app.Run();

Configuration Options

PortalServiceOptions

Property Type Description Default
PortalName string Display name for the portal ""
PortalContext PortalContext Portal configuration settings new()
AdditionalAssemblies Assembly[] Additional assemblies for Blazor components []
DisableAuth bool Disable authentication completely false
AuthIssuer string JWT token issuer "AuthIssuer"
AuthAudience string JWT token audience "AuthAudience"
AuthKey string JWT signing key Default secure key

User Context

The library automatically creates and manages user context from authenticated HTTP requests:

public class MyComponent : ComponentBase
{
    [Inject] public UserContext UserContext { get; set; } = default!;
    
    protected override void OnInitialized()
    {
        if (UserContext.IsAuthenticated)
        {
            var userName = UserContext.DisplayName;
            var email = UserContext.Email;
            var objectId = UserContext.ObjectId;
        }
    }
}

Middleware Pipeline

The library configures the following middleware pipeline:

  1. HTTPS Redirection
  2. Exception Handling (non-development)
  3. Authentication & Authorization (if enabled)
  4. User Context Middleware
  5. Static Files & Assets
  6. Antiforgery
  7. Request Localization
  8. Blazor Hub & Components

Localization

Built-in support for multiple cultures:

  • en-NZ (default)
  • en-US
  • af (Afrikaans)
  • mi (M?ori)

Path Base Support

Configure custom base paths for portal deployment:

options.PortalContext = new PortalContext
{
    PortalBasePath = "/admin" // Portal accessible at /admin
};

Authentication Claims

The library extracts the following claims from JWT tokens:

  • name - Display name
  • email / preferred_username - Email address
  • oid - Object identifier

Development vs Production

  • Development: Detailed errors enabled, exception page used
  • Production: Generic error page, HSTS enabled

Examples

Minimal Portal Setup

var builder = WebApplication.CreateBuilder(args);

builder.AddPortalServices(options =>
{
    options.PortalName = "Simple Portal";
    options.DisableAuth = true; // For development
});

var app = builder.Build();
app.UsePortalServices<App>();
app.Run();

Enterprise Portal with Authentication

var builder = WebApplication.CreateBuilder(args);

builder.AddPortalServices(options =>
{
    options.PortalName = "Enterprise Portal";
    options.PortalContext = new PortalContext
    {
        PortalBasePath = "/enterprise"
    };
    options.AuthIssuer = builder.Configuration["Auth:Issuer"];
    options.AuthAudience = builder.Configuration["Auth:Audience"];
    options.AuthKey = builder.Configuration["Auth:SigningKey"];
    options.AdditionalAssemblies = [
        typeof(EnterpriseComponents.Dashboard).Assembly,
        typeof(ReportingComponents.Reports).Assembly
    ];
});

var app = builder.Build();
app.UsePortalServices<App>();
app.Run();

Contributing

This library is part of the Nabs Launchpad framework. For contributing guidelines, please refer to the main repository documentation.

License

Copyright � Net Advantage Business Solutions. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.209 0 12/30/2025
10.0.208 0 12/30/2025
10.0.207 19 12/29/2025
10.0.206 23 12/29/2025
10.0.205 161 12/24/2025
10.0.204 163 12/21/2025
10.0.203 261 12/18/2025
10.0.202 262 12/17/2025
10.0.200 269 12/17/2025
10.0.199 425 12/10/2025
10.0.197 169 12/5/2025
10.0.196 662 12/3/2025
10.0.195 665 12/3/2025
10.0.194 665 12/3/2025
10.0.193 665 12/2/2025
10.0.192 170 11/28/2025
10.0.190 174 11/27/2025
10.0.189 158 11/23/2025
10.0.187 160 11/23/2025
10.0.186 145 11/23/2025
10.0.184 400 11/20/2025
10.0.181-rc3 272 11/11/2025
10.0.180 283 11/11/2025
10.0.179-rc2 241 11/11/2025
10.0.178-rc2 191 11/10/2025
10.0.177-rc2 179 11/10/2025
10.0.176-rc2 144 11/6/2025
10.0.175-rc2 146 11/6/2025
10.0.174-rc2 143 11/5/2025
10.0.173-rc2 145 11/3/2025
10.0.172-rc2 98 11/2/2025
10.0.170-rc2 82 11/1/2025
10.0.169-rc2 72 11/1/2025
10.0.168-rc2 84 10/31/2025
10.0.166-rc2 77 10/31/2025
10.0.164-rc2 145 10/28/2025
10.0.162-rc2 140 10/24/2025
9.0.151 110 10/17/2025
9.0.150 180 9/10/2025
9.0.146 135 8/15/2025
9.0.145 164 8/11/2025
9.0.144 185 8/8/2025
9.0.137 138 7/29/2025
9.0.136 148 7/29/2025
9.0.135 161 7/28/2025
9.0.134 188 7/9/2025
9.0.133 182 7/9/2025
9.0.132 185 7/9/2025
9.0.131 198 7/9/2025
9.0.130 190 7/7/2025