示例#1
0
        public async Task <Unit> Handle(CreateAccessToken request, CancellationToken cancellationToken)
        {
            var userId = request.UserId;

            var user = await GetUserOrThrowAsync(userId);

            await RefreshTokenRepository.AddAndSaveAsync(new RefreshToken(user, _passwordHasher));

            return(Unit.Value);
        }