Announcement Announcement Module
Collapse
No announcement yet.
Dynamic and Static users? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic and Static users?

    From my understanding, there are two ways of having users that can be authenticated. One is from "jdbc-user-service" (dynamic database driven). The other is "user-service" (statically defined usersnames, passwords, and roles).

    If I simply have both present, it takes "user-service" and completely ignores the other.

    Is there a way to have both methods used?
    Can I get spring to check against one and then the other?
    Or check against both simultaneously?

    I know that probably sounds like an odd request... I couldn't even find anything about the question even being proposed. But it's something that's been requested of me for this specific project.

    Thanks in advanced for any help I can get.

  • #2
    Originally posted by j_iceman05 View Post
    From my understanding, there are two ways of having users that can be authenticated. One is from "jdbc-user-service" (dynamic database driven). The other is "user-service" (statically defined usersnames, passwords, and roles).
    No, you can integrate any authentication service you like by implementing AuthenticationProvider directly.

    Is there a way to have both methods used?
    Can I get spring to check against one and then the other?
    This is the default - try each provider in order until a valid result is obtained.

    Or check against both simultaneously?
    I don't know what you mean by this. If you want to make concurrent requests then you'd obviously have to use separate threads.

    Comment


    • #3
      Thank you Luke.
      I didn't end up needing to write my own AuthenticationProvider, but what you said lead me to the following:
      http://www.codercorp.com/blog/spring...-security.html

      Implementing my own UserDetailsService worked perfectly.

      Thank you for your help.

      Comment

      Working...
      X