mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #4629] [MERGED] Provide NoResult instead of Fail in CustomAuthenticationHandler #10203
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/4629
Author: @crobibero
Created: 12/1/2020
Status: ✅ Merged
Merged: 12/2/2020
Merged by: @cvium
Base:
master← Head:auth-handler📝 Commits (2)
38b3b4fProvide NoResult instead of Fail in CustomAuthenticationHandlercd459c5Return NoResult only when request doesn't have a token.📊 Changes
5 files changed (+22 additions, -5 deletions)
View changed files
📝
Emby.Server.Implementations/HttpServer/Security/AuthService.cs(+8 -1)📝
Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs(+3 -1)📝
Jellyfin.Api/Auth/CustomAuthenticationHandler.cs(+4 -1)📝
MediaBrowser.Controller/Net/AuthorizationInfo.cs(+5 -0)📝
tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs(+2 -2)📄 Description
The ASP.NET framework automatically logs when an AuthenticationHandler fails, so return
AuthenticateResult.NoResult()instead. Authorization is still failed by the AuthorizationHandler(s)Fixes https://github.com/jellyfin/jellyfin/issues/4627
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.