Exemple #1
0
        public async Task <IActionResult> SessionExpiryNotification([FromRoute] string userId)
        {
            if (!string.IsNullOrEmpty(userId))
            {
                var result = await _userSvc.ExpireUserSessionAsync(userId);

                if (result.IsValid)
                {
                    _authSvc.DeleteAllCookies(_cookiesToDelete);
                    return(Ok(new { Message = "Success" }));
                }
            }

            _authSvc.DeleteAllCookies(_cookiesToDelete);
            return(BadRequest(new { Message = "Failed" }));
        }