mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Update auth.md
This commit is contained in:
parent
4351d21fd7
commit
dcf4eefc61
@ -88,15 +88,15 @@ static void Main(string[] args)
|
|||||||
|
|
||||||
static void auth_OnResponseReceivedEvent(Token token, string state, string error)
|
static void auth_OnResponseReceivedEvent(Token token, string state, string error)
|
||||||
{
|
{
|
||||||
//stop the http server
|
|
||||||
auth.StopHttpServer();
|
|
||||||
|
|
||||||
var spotify = new SpotifyWebApiClass()
|
var spotify = new SpotifyWebApiClass()
|
||||||
{
|
{
|
||||||
TokenType = token.TokenType,
|
TokenType = token.TokenType,
|
||||||
AccessToken = token.AccessToken
|
AccessToken = token.AccessToken
|
||||||
};
|
};
|
||||||
//We can now make calls with the token object
|
//We can now make calls with the token object
|
||||||
|
|
||||||
|
//stop the http server
|
||||||
|
auth.StopHttpServer();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -138,8 +138,6 @@ static void Main(string[] args)
|
|||||||
|
|
||||||
private static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse response)
|
private static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse response)
|
||||||
{
|
{
|
||||||
//Stop the HTTP Server, done.
|
|
||||||
auth.StopHttpServer();
|
|
||||||
|
|
||||||
//NEVER DO THIS! You would need to provide the ClientSecret.
|
//NEVER DO THIS! You would need to provide the ClientSecret.
|
||||||
//You would need to do it e.g via a PHP-Script.
|
//You would need to do it e.g via a PHP-Script.
|
||||||
@ -152,6 +150,9 @@ private static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse re
|
|||||||
};
|
};
|
||||||
|
|
||||||
//With the token object, you can now make API calls
|
//With the token object, you can now make API calls
|
||||||
|
|
||||||
|
//Stop the HTTP Server, done.
|
||||||
|
auth.StopHttpServer();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user