namespace IOL.BookmarkThing.Server.Api.V1;
///
[Authorize(AuthenticationSchemes = AuthSchemes)]
[ApiController]
public class BaseV1Route : ControllerBase
{
private const string AuthSchemes = CookieAuthenticationDefaults.AuthenticationScheme + "," + Constants.BASIC_AUTH_SCHEME;
///
/// User data for the currently logged on user.
///
protected LoggedInV1User LoggedInUser => new() {
Username = User.Identity?.Name,
Id = User.Claims.SingleOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value.ToGuid() ?? default
};
}