Spring Security [Spring Boot App] : How to block a user? -


my project on employee exit process , once employee relieved, expected block employee logging in and not delete employee.

attempts:

  1. userobject.iscredentialsnonexpired() = false
  2. userobject.isaccountnonlocked() = false
  3. userobject.isaccountnonexpired() = false
  4. userobject.isenabled() = false

even when modify these 4 values, login still works user.

@autowired  employeerepository emprep;   @override  public employeeentity loaduserbyusername(string username) throws usernamenotfoundexception {      employeeentity emp = emprep.findbyuserid(username);      if (emp == null) {          throw new usernamenotfoundexception("user trapped in singularity");      }      return emp;  }  


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -