Update to latest packages and show examples

This commit is contained in:
2026-07-05 22:05:53 +02:00
parent 3a36978997
commit c7ddc282ed
52 changed files with 2156 additions and 21 deletions
@@ -0,0 +1,43 @@
using Asp.Versioning;
using GerstITS.Examples.Api.Versioning;
using GerstITS.Validation;
using GerstITS.Web.Api;
using GerstITS.Web.Api.FluentApi;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace GerstITS.Examples.Api.Controllers._1._1;
/// <summary>
/// Is responsible to demonstrate open id (jwt bearer) protected endpoints.
/// </summary>
[ApiController,
ApiVersion(Versions._1_1),
Authorize,
Route(ApplicationEnvironment.WebApi.ControllerRouteTemplate)]
public class SecuredController : FluentApiControllerBase
{
#region Constructors
public SecuredController(IValidator validator)
: base(validator)
{
}
#endregion
#region Methods
/// <summary>
/// Gets the name of the authenticated user. Requires a valid bearer token.
/// </summary>
/// <returns>Returns the name of the authenticated user.</returns>
[HttpGet,
Route("Me")]
public IActionResult Me()
{
return Api().Get(() => User.Identity.Name);
}
#endregion
}