ahmed elbarbary

ahmed elbarbary

  • 1.1k
  • 885
  • 36.9k

how to make attempt login failed for user per no of try per

Sep 3 2019 11:39 PM
problem
how to make attempt login failed for user per no of try per period ?
i work on asp.net core 2.2 web api
i need to write function on login http post make count to failed login attempt within period of time
failed login within period 10 minutes the if it exceed it will redirect to url xxxx .
  1. [HttpPost(Contracts.ApiRoutes.Login.UserLogin)]  
  2. public IActionResult PostUserLogins([FromBody]Users user)  
  3. {  
  4. // how to do count login attempt and call here   
  5. if (isvalid)  
  6.   
  7. {  
  8.   
  9. }  
  10.   
  11. else  
  12.   
  13. {  
  14.   
  15. }  
  16.   
  17. }  
my function structure as above ?
How to write function by c# return Boolean and tell me login exceed retry faild number login or not
and call

Brought to you by:

Answers (1)