masastack / MASA.Framework

.NET next-generation microservice development framework, which provides cloud native best practices based on Dapr.
https://docs.masastack.com/framework/getting-started/overview
MIT License
695 stars 111 forks source link

How can I use RequireAuthorization #700

Closed CHminggao closed 3 months ago

CHminggao commented 3 months ago

Description

I need to use jwt to verify requests from other systems, but I haven't seen how to add RequireAuthorization on the MiniAPI

for example app.MapGet("/weatherforecast", () =>{}).RequireAuthorization()

.NET version

8.0

MASA Framework version

1.0

CHminggao commented 3 months ago

Service Add [Authorize]