mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
v0.8.9.1 Hotfix (#4376)
Co-authored-by: Joe Milazzo <josephmajora@gmail.com> Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Adam Havránek <adamhavra@seznam.cz> Co-authored-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com> Co-authored-by: Christophorus Daniel Tegar P <tegar.200503@gmail.com> Co-authored-by: Frozehunter <frozehunter@me.com> Co-authored-by: Gregory.Open <gregory.open@proton.me> Co-authored-by: Havokdan <havokdan@yahoo.com.br> Co-authored-by: Kovács Gábor <naszalykmb@gmail.com> Co-authored-by: karigane <169052233+karigane-cha@users.noreply.github.com> Co-authored-by: lin49931104 <a82122794@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: 無情天 <kofzhanganguo@126.com> Co-authored-by: 안세훈 <on9686@gmail.com>
This commit is contained in:
@@ -37,6 +37,11 @@ public class BaseApiController : ControllerBase
|
||||
/// <remarks>Warning! Username's can contain .. and /, do not use folders or filenames explicitly with the Username</remarks>
|
||||
protected string? Username => UserContext.GetUsername();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the auth key used for authentication, null if a different authentication method was used
|
||||
/// </summary>
|
||||
protected string? AuthKey => User.Claims.FirstOrDefault(c => c.Type == "AuthKey")?.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Returns a physical file with proper HTTP caching headers and ETag support.
|
||||
/// Automatically handles conditional requests (If-None-Match) returning 304 Not Modified when appropriate.
|
||||
|
||||
Reference in New Issue
Block a user