Results 1 to 6 of 6

Thread: please help me regarding the Spring Security authentication-manager

  1. #1
    Join Date
    Sep 2011
    Posts
    9

    Default please help me regarding the Spring Security authentication-manager

    Code:
    <authentication-manager>
    		<authentication-provider>
    			<jdbc-user-service data-source-ref="dataSource"
    				users-by-username-query="
    			 select username,password, enabled from users where USERNAME=?"
    				authorities-by-username-query="
     		     select u.username, ur.authority from users u, authorities ur 
    		      where u.user_id = ur.user_id and u.username =? " />
    		</authentication-provider>
    	</authentication-manager>
    in spring security can i create with table name xyz instead of table name users.

  2. #2
    Join Date
    Dec 2008
    Location
    India
    Posts
    295

    Default

    yes you can create also you can create your own "user service" for customize data fetching purpose
    Enjoy
    Rohan Chauhan
    ------------------------------------------------------------------------------
    SpringSource Certified Spring 3.0 Professional


  3. #3
    Join Date
    Sep 2011
    Posts
    9

    Default

    rohan can you help me how i can achieve it.. i am new to spring security . please guide me..

    Thanks
    Manish

  4. #4
    Join Date
    Dec 2011
    Location
    Hyderabad
    Posts
    2

  5. #5
    Join Date
    Dec 2008
    Location
    India
    Posts
    295

    Default

    Implement UserDetailsService interface which will return of type "UserDetails"(which represent actual user data/details)

    and inject YourCustomUserDetailsService into AuthenticationProvider
    Enjoy
    Rohan Chauhan
    ------------------------------------------------------------------------------
    SpringSource Certified Spring 3.0 Professional


  6. #6
    Join Date
    Sep 2011
    Posts
    9

    Default

    thanks adi and rohan

    Manish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •