From f7ceb6c3a759f06c8537814c427d9e3482329cc8 Mon Sep 17 00:00:00 2001 From: PartyDonut <42371342+PartyDonut@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:29:38 +0200 Subject: [PATCH] fix: Updated auth header (#62) ## Pull Request Description Use updated auth header for jellyfin authentication ## Issue Being Fixed Using deprecated auth headers Resolves #61 ## Checklist - [x] If a new package was added, did you ensure it works for all supported platforms? Is the package also well maintained? - [x] Did you add localization for any text? If yes, did you sort the .arb file using ```arb_utils sort ```? - [x] Check that any changes are related to the issue at hand. Co-authored-by: PartyDonut --- lib/models/credentials_model.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/models/credentials_model.dart b/lib/models/credentials_model.dart index 9bd2c4a..bf3eea6 100644 --- a/lib/models/credentials_model.dart +++ b/lib/models/credentials_model.dart @@ -1,9 +1,9 @@ import 'dart:convert'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:xid/xid.dart'; import 'package:fladder/util/application_info.dart'; -import 'package:xid/xid.dart'; class CredentialsModel { final String token; @@ -27,9 +27,8 @@ class CredentialsModel { final application = ref.read(applicationInfoProvider); final headers = { 'content-type': 'application/json', - 'x-emby-token': token, - 'x-emby-authorization': - 'MediaBrowser Client="${application.name}", Device="${application.os}", DeviceId="$deviceId", Version="${application.version}"' + 'authorization': + 'MediaBrowser Token="$token", Client="${application.name}", Device="${application.os}", DeviceId="$deviceId", Version="${application.version}"' }; return headers; }