blob: 2f92c8e599d38897cc1fc87290d5c1855667dd40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
namespace IOL.BookmarkThing.Server.Api.Internal;
/// <inheritdoc />
[Authorize]
[ApiController]
public class BaseInternalRoute : ControllerBase
{
/// <summary>
/// User data for the currently logged on user.
/// </summary>
protected LoggedInInternalUser LoggedInUser => new() {
Username = User.Identity?.Name,
Id = User.Claims.SingleOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value.ToGuid() ?? default
};
}
|