aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/UserController.cs
diff options
context:
space:
mode:
authorNiels van Velzen <git@ndat.nl>2022-12-19 21:46:12 +0100
committerNiels van Velzen <git@ndat.nl>2022-12-19 21:46:12 +0100
commit479d477e01039e95f4647e5b85f2bcd5ec560e81 (patch)
tree3ffd29c1179a1451a1efff1d315bf2bca315f850 /Jellyfin.Api/Controllers/UserController.cs
parent7a3a9fb7e470c80b5ca1aecdb7da9c2f0fe6d8ce (diff)
Deprecate user id based authentication endpoint
Diffstat (limited to 'Jellyfin.Api/Controllers/UserController.cs')
-rw-r--r--Jellyfin.Api/Controllers/UserController.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs
index 002327d74..568224a42 100644
--- a/Jellyfin.Api/Controllers/UserController.cs
+++ b/Jellyfin.Api/Controllers/UserController.cs
@@ -157,7 +157,6 @@ namespace Jellyfin.Api.Controllers
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="pw">The password as plain text.</param>
- /// <param name="password">The password sha1-hash.</param>
/// <response code="200">User authenticated.</response>
/// <response code="403">Sha1-hashed password only is not allowed.</response>
/// <response code="404">User not found.</response>
@@ -166,10 +165,10 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
+ [Obsolete("Authenticate with username instead")]
public async Task<ActionResult<AuthenticationResult>> AuthenticateUser(
[FromRoute, Required] Guid userId,
- [FromQuery, Required] string pw,
- [FromQuery] string? password)
+ [FromQuery, Required] string pw)
{
var user = _userManager.GetUserById(userId);
@@ -178,11 +177,6 @@ namespace Jellyfin.Api.Controllers
return NotFound("User not found");
}
- if (!string.IsNullOrEmpty(password) && string.IsNullOrEmpty(pw))
- {
- return StatusCode(StatusCodes.Status403Forbidden, "Only sha1 password is not allowed.");
- }
-
AuthenticateUserByName request = new AuthenticateUserByName
{
Username = user.Username,