Fix Jellyfin auth: use MediaBrowser Authorization scheme, not X-Emby-Token
Build and Deploy / build-and-deploy (push) Successful in 1m56s
Build and Deploy / build-and-deploy (push) Successful in 1m56s
This server (Jellyfin 12.0.0) rejects X-Emby-Token, X-MediaBrowser-Token, a raw Authorization value, and Authorization: Bearer <token> - all with 401 - even against a freshly generated API key confirmed valid via curl. Its OpenAPI spec names Authorization as the apiKey header, but the only value it actually accepts is the legacy 'MediaBrowser Token="<key>"' scheme, confirmed working via curl against the live server. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
5fb05d8bec
commit
faec2a3463
@@ -16,8 +16,11 @@ public class JellyfinClient {
|
||||
}
|
||||
|
||||
private RestClient client(IntegrationSetting setting) {
|
||||
// This server's OpenAPI spec declares "Authorization" as a plain
|
||||
// apiKey header, but in practice it only accepts the legacy
|
||||
// MediaBrowser scheme value, not a raw token or Bearer prefix.
|
||||
return restClientBuilder.baseUrl(setting.getBaseUrl())
|
||||
.defaultHeader("X-Emby-Token", setting.getApiKey())
|
||||
.defaultHeader("Authorization", "MediaBrowser Token=\"" + setting.getApiKey() + "\"")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user