summaryrefslogtreecommitdiffstats
path: root/server/src/Endpoints/Internal/BaseRoute.cs
blob: 3e2c6af85453d32feb169e91b74c2356cf3af47f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
namespace IOL.GreatOffice.Api.Endpoints.Internal;

[Authorize]
[ApiController]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiVersionNeutral]
public class BaseRoute : ControllerBase
{
	/// <summary>
	/// User data for the currently logged on user.
	/// </summary>
	protected LoggedInUserModel LoggedInUser => new() {
			Username = User.FindFirstValue(AppClaims.NAME),
			Id = User.FindFirstValue(AppClaims.USER_ID).AsGuid(),
	};
}