public async Task <string> GetPartyGoerAccessTokenAsync(PartyGoer partyGoer) { if (await _spotifyAuthentication.DoesAccessTokenNeedRefreshAsync(partyGoer.GetId())) { await _spotifyHttpClient.RefreshTokenForUserAsync(partyGoer.GetId()); } return(await _spotifyAuthentication.GetAccessTokenAsync(partyGoer)); }
public async Task <IActionResult> GetPartyGoerSpotifyAccessToken() { return(new JsonResult(new { AccessToken = await _spotifyAuthentication.GetAccessTokenAsync(await _partyGoerService.GetCurrentPartyGoerAsync()) })); }
public async Task <string> GetPartyGoerAccessTokenAsync(PartyGoer partyGoer) { return(await _spotifyAuthentication.GetAccessTokenAsync(partyGoer)); }