MintPlayer.Spark.Controllers 11.0.0-preview.92

This is a prerelease version of MintPlayer.Spark.Controllers.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MintPlayer.Spark.Controllers --version 11.0.0-preview.92
                    
NuGet\Install-Package MintPlayer.Spark.Controllers -Version 11.0.0-preview.92
                    
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="MintPlayer.Spark.Controllers" Version="11.0.0-preview.92" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MintPlayer.Spark.Controllers" Version="11.0.0-preview.92" />
                    
Directory.Packages.props
<PackageReference Include="MintPlayer.Spark.Controllers" />
                    
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 MintPlayer.Spark.Controllers --version 11.0.0-preview.92
                    
#r "nuget: MintPlayer.Spark.Controllers, 11.0.0-preview.92"
                    
#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 MintPlayer.Spark.Controllers@11.0.0-preview.92
                    
#: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=MintPlayer.Spark.Controllers&version=11.0.0-preview.92&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MintPlayer.Spark.Controllers&version=11.0.0-preview.92&prerelease
                    
Install as a Cake Tool

MintPlayer.Spark.Controllers

MVC controller support for MintPlayer.Spark.

An application's own controllers normally sit beside Spark rather than inside it: they authenticate and authorize, but nothing Spark configures is scoped to them, so the antiforgery gate never fires on them and there is no way to authorize an action against the same security.json right the Spark pipeline checks.

builder.Services.AddSpark(spark =>
{
    spark.AddControllers();
    spark.UseControllers();

    // Since 11.0.0 the antiforgery gate is on by default; all this names is which
    // paths are yours. Assigning REPLACES the defaults (/spark and /connect).
    spark.AddAntiforgeryProtection(a =>
    {
        a.PathPrefixes = ["/spark", "/connect", "/api"];
    });
});

app.UseRouting();
app.UseSpark();
app.MapSpark();      // mounts the controllers too

Do not also call endpoints.MapControllers(). Analyzer SPARK010 reports it: at runtime the call leaves no trace Spark can inspect, so the diagnostic is the only place it can be caught.

Authorize an action against a Spark right — [SparkAuthorize] ships in MintPlayer.Spark.Authorization, because it is the package that owns security.json:

[HttpPost("tokens")]
[SparkAuthorize("New", nameof(UploadToken))]
public async Task<IActionResult> Create() { … }
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
11.0.1 55 11/18/2026
11.0.0 83 11/16/2026
11.0.0-preview.108 52 11/12/2026
11.0.0-preview.107 54 11/11/2026
11.0.0-preview.106 65 11/7/2026
11.0.0-preview.105 52 11/7/2026
11.0.0-preview.104 56 11/6/2026
11.0.0-preview.103 58 11/5/2026
11.0.0-preview.102 60 11/5/2026
11.0.0-preview.101 53 11/5/2026
11.0.0-preview.100 61 11/4/2026
11.0.0-preview.99 67 10/30/2026
11.0.0-preview.98 74 10/24/2026
11.0.0-preview.97 67 10/24/2026
11.0.0-preview.96 85 10/11/2026
11.0.0-preview.95 75 10/4/2026
11.0.0-preview.94 73 10/4/2026
11.0.0-preview.93 78 10/2/2026
11.0.0-preview.92 67 10/2/2026
11.0.0-preview.91 71 9/29/2026
Loading failed