[PR #4629] [MERGED] Provide NoResult instead of Fail in CustomAuthenticationHandler #10203

Closed
opened 2026-02-07 06:15:56 +03:00 by OVERLORD · 0 comments
Owner

📋 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: masterHead: auth-handler


📝 Commits (2)

  • 38b3b4f Provide NoResult instead of Fail in CustomAuthenticationHandler
  • cd459c5 Return 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.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/4629 **Author:** [@crobibero](https://github.com/crobibero) **Created:** 12/1/2020 **Status:** ✅ Merged **Merged:** 12/2/2020 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `auth-handler` --- ### 📝 Commits (2) - [`38b3b4f`](https://github.com/jellyfin/jellyfin/commit/38b3b4f8672373c8e1ac2e509d759fe07d179146) Provide NoResult instead of Fail in CustomAuthenticationHandler - [`cd459c5`](https://github.com/jellyfin/jellyfin/commit/cd459c51f3d8a6a46a802759df1620ec43e5d2ae) Return NoResult only when request doesn't have a token. ### 📊 Changes **5 files changed** (+22 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:15:56 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10203