public async Task <IActionResult> CreateRefreshToken()
        {
            RefreshTokenIdentityAdto refreshTokenIdentityAdto = await _identityApplicationService.CreateRefreshTokenAsync(new CreateRefreshTokenAdto
            {
                IdentityId = _currentIdentityProvider.Id
            });

            return(Ok(_resourceBuilder.Build(new RefreshTokenResource
            {
                Token = refreshTokenIdentityAdto.Token
            })));
        }
 public Task <RefreshTokenIdentityAdto> CreateRefreshTokenAsync(CreateRefreshTokenAdto createRefreshTokenAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _identityApplicationService.CreateRefreshTokenAsync(createRefreshTokenAdto),
                                                    IdentityAuthorisationContext.Create(createRefreshTokenAdto.IdentityId, AuthorisationAction.Update)));
 }