|
@@ -157,7 +157,6 @@ namespace Jellyfin.Api.Controllers
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="userId">The user id.</param>
|
|
/// <param name="userId">The user id.</param>
|
|
/// <param name="pw">The password as plain text.</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="200">User authenticated.</response>
|
|
/// <response code="403">Sha1-hashed password only is not allowed.</response>
|
|
/// <response code="403">Sha1-hashed password only is not allowed.</response>
|
|
/// <response code="404">User not found.</response>
|
|
/// <response code="404">User not found.</response>
|
|
@@ -166,10 +165,10 @@ namespace Jellyfin.Api.Controllers
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
|
|
+ [Obsolete("Authenticate with username instead")]
|
|
public async Task<ActionResult<AuthenticationResult>> AuthenticateUser(
|
|
public async Task<ActionResult<AuthenticationResult>> AuthenticateUser(
|
|
[FromRoute, Required] Guid userId,
|
|
[FromRoute, Required] Guid userId,
|
|
- [FromQuery, Required] string pw,
|
|
|
|
- [FromQuery] string? password)
|
|
|
|
|
|
+ [FromQuery, Required] string pw)
|
|
{
|
|
{
|
|
var user = _userManager.GetUserById(userId);
|
|
var user = _userManager.GetUserById(userId);
|
|
|
|
|
|
@@ -178,11 +177,6 @@ namespace Jellyfin.Api.Controllers
|
|
return NotFound("User not found");
|
|
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
|
|
AuthenticateUserByName request = new AuthenticateUserByName
|
|
{
|
|
{
|
|
Username = user.Username,
|
|
Username = user.Username,
|