コード例 #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));
 }