示例#1
0
        public async Task <string> GetPartyGoerAccessTokenAsync(PartyGoer partyGoer)
        {
            if (await _spotifyAuthentication.DoesAccessTokenNeedRefreshAsync(partyGoer.GetId()))
            {
                await _spotifyHttpClient.RefreshTokenForUserAsync(partyGoer.GetId());
            }

            return(await _spotifyAuthentication.GetAccessTokenAsync(partyGoer));
        }
示例#2
0
 public async Task <IActionResult> GetPartyGoerSpotifyAccessToken()
 {
     return(new JsonResult(new { AccessToken = await _spotifyAuthentication.GetAccessTokenAsync(await _partyGoerService.GetCurrentPartyGoerAsync()) }));
 }
示例#3
0
 public async Task <string> GetPartyGoerAccessTokenAsync(PartyGoer partyGoer)
 {
     return(await _spotifyAuthentication.GetAccessTokenAsync(partyGoer));
 }