1- using System ;
2- using System . Net ;
31using System . Threading . Tasks ;
42using SpotifyAPI . Web . Enums ;
53using SpotifyAPI . Web . Models ;
64using Unosquare . Labs . EmbedIO ;
75using Unosquare . Labs . EmbedIO . Constants ;
86using Unosquare . Labs . EmbedIO . Modules ;
9- #if NETSTANDARD2_0
10- using System . Net . Http ;
11- #endif
12- #if NET46
13- using System . Net . Http ;
14- using HttpListenerContext = Unosquare . Net . HttpListenerContext ;
15- #endif
167
178namespace SpotifyAPI . Web . Auth
189{
19- public class ImplictGrantAuth : SpotifyAuthServer < Token >
10+ public class ImplicitGrantAuth : SpotifyAuthServer < Token >
2011 {
21- public ImplictGrantAuth ( string clientId , string redirectUri , string serverUri , Scope scope = Scope . None , string state = "" ) :
12+ public ImplicitGrantAuth ( string clientId , string redirectUri , string serverUri , Scope scope = Scope . None , string state = "" ) :
2213 base ( "token" , "ImplicitGrantAuth" , redirectUri , serverUri , scope , state )
2314 {
2415 ClientId = clientId ;
2516 }
2617
2718 protected override void AdaptWebServer ( WebServer webServer )
2819 {
29- webServer . Module < WebApiModule > ( ) . RegisterController < ImplictGrantAuthController > ( ) ;
20+ webServer . Module < WebApiModule > ( ) . RegisterController < ImplicitGrantAuthController > ( ) ;
3021 }
3122 }
3223
33- public class ImplictGrantAuthController : WebApiController
24+ public class ImplicitGrantAuthController : WebApiController
3425 {
3526 [ WebApiHandler ( HttpVerbs . Get , "/auth" ) ]
3627 public Task < bool > GetAuth ( )
3728 {
3829 string state = Request . QueryString [ "state" ] ;
39- SpotifyAuthServer < Token > auth = ImplictGrantAuth . GetByState ( state ) ;
30+ SpotifyAuthServer < Token > auth = ImplicitGrantAuth . GetByState ( state ) ;
4031 if ( auth == null )
4132 return this . StringResponseAsync (
4233 $ "Failed - Unable to find auth request with state \" { state } \" - Please retry") ;
@@ -57,7 +48,7 @@ public Task<bool> GetAuth()
5748 }
5849 else
5950 {
60- token = new Token ( )
51+ token = new Token
6152 {
6253 Error = error
6354 } ;
@@ -67,7 +58,7 @@ public Task<bool> GetAuth()
6758 return this . StringResponseAsync ( "OK - This window can be closed now" ) ;
6859 }
6960
70- public ImplictGrantAuthController ( IHttpContext context ) : base ( context )
61+ public ImplicitGrantAuthController ( IHttpContext context ) : base ( context )
7162 {
7263 }
7364 }
0 commit comments