+1 vote
in Other by
I want to implement spring database backed authentication for all jersey Client requests. i have added the spring security filter chain to my web.xml, and this to my spring security context xml file :

    <authentication-manager>

          <authentication-provider user-service-ref="myDetailsService">

                  <jdbc-user-service data-source-ref="dataSource" />

          </authentication-provider>

    </authentication-manager>

    <beans:bean id="myDetailsService" class="myPackage.MyDetailsService"/>

My question is on the MyUserDetailsService class where i want to retrieve user whose credentials (saved in a database) match those sent by the jersey client. this is my impl:

class MyUserDetailsService implements UserDetailsService{

      public MyUserDetailsService(String username,String password){}

     // i get the connexion from datasource

     // and request user with corresponding username/password

     // and return that user.  

}

How can i pass the username/password that i got from jersey client request to create a user? (sent in header or in query URL)

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Did you try the AuthenticationUserDetailsService class? The Authentication object passed to loadUserDetails has the principal identity and credentials of the user.

Related questions

+1 vote
asked Feb 1, 2022 in Other by DavidAnderson
+1 vote
asked Feb 1, 2022 in Other by DavidAnderson
...