summaryrefslogtreecommitdiffstats
path: root/src/server/Api/Internal/BaseInternalRoute.cs
blob: b6b532f9b84300b3b5345fed2ae8be388983d987 (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() {
			Id = User.FindFirstValue(AppClaims.USER_ID).ToGuid(),
			Username = User.FindFirstValue(AppClaims.NAME),
	};
}