Announcement Announcement Module
Collapse
No announcement yet.
Spring Security in a multi-tenant environment? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Security in a multi-tenant environment?

    Hi,

    I am using Spring Security in a multi-tenant environment, whereby the login form takes in j_username, j_password, and j_company (additional) parameter. The problem I am running into is that the default JdbcDaoImpl's loadUserByUsername method as the name suggest only takes username into consideration when performing a look up against a user store.

    Code:
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
    However in my case username alone does not guarantee uniqueness and all 3 parameters (username, password, and company) are used to perform a lookup resulting in a distinct record. What is the best way to accomplish this?

    Thank you for your help,
    rosh

  • #2
    Please check the FAQ, as this is a common question.

    Comment

    Working...
    X