MintPlayer.Spark.Controllers 10.0.0-preview.80

This is a prerelease version of MintPlayer.Spark.Controllers.
dotnet add package MintPlayer.Spark.Controllers --version 10.0.0-preview.80
                    
NuGet\Install-Package MintPlayer.Spark.Controllers -Version 10.0.0-preview.80
                    
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="10.0.0-preview.80" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MintPlayer.Spark.Controllers" Version="10.0.0-preview.80" />
                    
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 10.0.0-preview.80
                    
#r "nuget: MintPlayer.Spark.Controllers, 10.0.0-preview.80"
                    
#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@10.0.0-preview.80
                    
#: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=10.0.0-preview.80&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MintPlayer.Spark.Controllers&version=10.0.0-preview.80&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();

    spark.AddAntiforgeryProtection(a =>
    {
        a.PathPrefixes = ["/spark", "/connect", "/api"];
        a.RequireAntiforgery = true;
    });
});

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 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.0-preview.80 39 9/10/2026
10.0.0-preview.79 48 9/9/2026
10.0.0-preview.78 43 9/9/2026
10.0.0-preview.77 36 9/9/2026
10.0.0-preview.76 42 9/9/2026
10.0.0-preview.75 54 9/7/2026
10.0.0-preview.74 54 9/7/2026
10.0.0-preview.73 59 9/7/2026
10.0.0-preview.72 59 9/6/2026
10.0.0-preview.71 55 9/3/2026
10.0.0-preview.70 54 9/2/2026
10.0.0-preview.69 52 9/1/2026
10.0.0-preview.68 67 8/29/2026
10.0.0-preview.67 65 8/29/2026
10.0.0-preview.65 58 8/28/2026
10.0.0-preview.64 68 8/24/2026
10.0.0-preview.63 58 8/23/2026
10.0.0-preview.62 63 8/23/2026
10.0.0-preview.60 69 8/21/2026