Made port variable and adapted example to use port 8000

This commit is contained in:
Johnny Dellinger @PC 2015-09-08 15:35:07 +02:00
parent 9ac735f1c7
commit d8e3238f09
4 changed files with 8 additions and 8 deletions

View File

@ -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("")]

View File

@ -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();
}
}

View File

@ -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);

View File

@ -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);