From d8e3238f09ce02c76071f2365951822282596255 Mon Sep 17 00:00:00 2001 From: "Johnny Dellinger @PC" Date: Tue, 8 Sep 2015 15:35:07 +0200 Subject: [PATCH] Made port variable and adapted example to use port 8000 --- SpotifyAPI.Example/Properties/AssemblyInfo.cs | 4 ++-- SpotifyAPI.Example/WebControl.cs | 4 ++-- SpotifyAPI/Web/Auth/AutorizationCodeAuth.cs | 4 ++-- SpotifyAPI/Web/Auth/ImplicitGrantAuth.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SpotifyAPI.Example/Properties/AssemblyInfo.cs b/SpotifyAPI.Example/Properties/AssemblyInfo.cs index 24b1a78b..4215e0a6 100644 --- a/SpotifyAPI.Example/Properties/AssemblyInfo.cs +++ b/SpotifyAPI.Example/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("SpotifyAPI.Example")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("HEAVEN KILLERS RELEASE GROUP")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SpotifyAPI.Example")] -[assembly: AssemblyCopyright("Copyright © HEAVEN KILLERS RELEASE GROUP 2015")] +[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SpotifyAPI.Example/WebControl.cs b/SpotifyAPI.Example/WebControl.cs index 7c08f9c2..9e8247a9 100644 --- a/SpotifyAPI.Example/WebControl.cs +++ b/SpotifyAPI.Example/WebControl.cs @@ -29,7 +29,7 @@ namespace SpotifyAPI.Example _savedTracks = new List(); _auth = new ImplicitGrantAuth { - RedirectUri = "http://localhost", + RedirectUri = "http://localhost:8000", ClientId = "26d287105e31491889f3cd293d85bfea", Scope = Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate | Scope.UserLibrarayRead | Scope.UserReadPrivate | Scope.UserFollowRead | Scope.UserReadBirthdate, State = "XSS" @@ -130,7 +130,7 @@ namespace SpotifyAPI.Example private void authButton_Click(object sender, EventArgs e) { - _auth.StartHttpServer(); + _auth.StartHttpServer(8000); _auth.DoAuth(); } } diff --git a/SpotifyAPI/Web/Auth/AutorizationCodeAuth.cs b/SpotifyAPI/Web/Auth/AutorizationCodeAuth.cs index 933de91d..5b0939b3 100644 --- a/SpotifyAPI/Web/Auth/AutorizationCodeAuth.cs +++ b/SpotifyAPI/Web/Auth/AutorizationCodeAuth.cs @@ -87,9 +87,9 @@ namespace SpotifyAPI.Web.Auth /// /// Start the internal HTTP-Server /// - public void StartHttpServer() + public void StartHttpServer(int port = 80) { - _httpServer = new SimpleHttpServer(80, AuthType.Authorization); + _httpServer = new SimpleHttpServer(port, AuthType.Authorization); _httpServer.OnAuth += HttpServerOnOnAuth; _httpThread = new Thread(_httpServer.Listen); diff --git a/SpotifyAPI/Web/Auth/ImplicitGrantAuth.cs b/SpotifyAPI/Web/Auth/ImplicitGrantAuth.cs index 80dc03ce..effd2582 100644 --- a/SpotifyAPI/Web/Auth/ImplicitGrantAuth.cs +++ b/SpotifyAPI/Web/Auth/ImplicitGrantAuth.cs @@ -44,9 +44,9 @@ namespace SpotifyAPI.Web.Auth /// /// Start the internal HTTP-Server /// - public void StartHttpServer() + public void StartHttpServer(int port = 80) { - _httpServer = new SimpleHttpServer(80, AuthType.Implicit); + _httpServer = new SimpleHttpServer(port, AuthType.Implicit); _httpServer.OnAuth += HttpServerOnOnAuth; _httpThread = new Thread(_httpServer.Listen);