MintPlayer.Spark.Controllers
10.0.0-preview.80
dotnet add package MintPlayer.Spark.Controllers --version 10.0.0-preview.80
NuGet\Install-Package MintPlayer.Spark.Controllers -Version 10.0.0-preview.80
<PackageReference Include="MintPlayer.Spark.Controllers" Version="10.0.0-preview.80" />
<PackageVersion Include="MintPlayer.Spark.Controllers" Version="10.0.0-preview.80" />
<PackageReference Include="MintPlayer.Spark.Controllers" />
paket add MintPlayer.Spark.Controllers --version 10.0.0-preview.80
#r "nuget: MintPlayer.Spark.Controllers, 10.0.0-preview.80"
#:package MintPlayer.Spark.Controllers@10.0.0-preview.80
#addin nuget:?package=MintPlayer.Spark.Controllers&version=10.0.0-preview.80&prerelease
#tool nuget:?package=MintPlayer.Spark.Controllers&version=10.0.0-preview.80&prerelease
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 | Versions 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. |
-
net10.0
- MintPlayer.SourceGenerators.Attributes (>= 10.20.1)
- MintPlayer.Spark (>= 10.0.0-preview.80)
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 |