mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 06:56:27 +00:00
Made port variable and adapted example to use port 8000
This commit is contained in:
parent
9ac735f1c7
commit
d8e3238f09
@ -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("")]
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace SpotifyAPI.Example
|
||||
_savedTracks = new List<FullTrack>();
|
||||
_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();
|
||||
}
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ namespace SpotifyAPI.Web.Auth
|
||||
/// <summary>
|
||||
/// Start the internal HTTP-Server
|
||||
/// </summary>
|
||||
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);
|
||||
|
@ -44,9 +44,9 @@ namespace SpotifyAPI.Web.Auth
|
||||
/// <summary>
|
||||
/// Start the internal HTTP-Server
|
||||
/// </summary>
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user