Exemple #1
0
        public ActionResult Logout()
        {
            // optionally "revoke" JWT token on the server side --> add the current token to a block-list
            // https://github.com/auth0/node-jsonwebtoken/issues/375

            var userName = User.Identity.Name;

            _jwtAuthManager.RemoveRefreshTokenByUserName(userName);
            _logger.LogInformation($"User [{userName}] logged out the system.");
            return(Ok());
        }
Exemple #2
0
 public void Logout(string?userName)
 {
     _jwtAuthService.RemoveRefreshTokenByUserName(userName);
     _logger.LogInformation($"User [{userName}] logged out the system.");
 }