From da7c60cb08b0924ff2a81e76b7cf5fa29aef7737 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Sat, 16 Sep 2023 18:30:42 +0800 Subject: [PATCH] Update SpotifyOAuth2Provider.cs --- MusicTypeChat/SpotifyOAuth2Provider.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/MusicTypeChat/SpotifyOAuth2Provider.cs b/MusicTypeChat/SpotifyOAuth2Provider.cs index fa50524..3fae4eb 100644 --- a/MusicTypeChat/SpotifyOAuth2Provider.cs +++ b/MusicTypeChat/SpotifyOAuth2Provider.cs @@ -1,6 +1,4 @@ -using System.Security.Cryptography; -using System.Text; -using System.Text.Json.Nodes; +using System.Text; using ServiceStack.Auth; namespace MusicTypeChat; @@ -63,19 +61,12 @@ protected override async Task GetAccessTokenJsonAsync(string code, AuthC var base64String = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{ConsumerKey}:{ConsumerSecret}")); var contents = await url.PostToUrlAsync(payload, - responseFilter: (res) => - { - // Log details - Console.WriteLine($"Response Status Code: {res.StatusCode}"); - Console.WriteLine($"Response Status Description: {res.ReasonPhrase}"); - }, requestFilter: req => req.Headers.Add("Authorization", $"Basic {base64String}"), token: token).ConfigAwait(); return contents; } - protected override async Task> CreateAuthInfoAsync(string accessToken, CancellationToken token = new()) {