spring security UserDetailsService

  Рет қаралды 7,060

Java Development Journal

Java Development Journal

3 жыл бұрын

spring security UserDetailsService. In this lesson, we will talk about the #springsecurity #userdetailsservice.We will be doing a database backed user authentication using by implementing a customs user details service.
In this lesson, we will learn what is UserDetailsService and how this is used in Spring security? We will create a custom UserDetailsService and will be injecting it to out #DaoAuthenticationProvider.
We are assuming that you have already gone through previous lessons and know how the #authenticationproviders works in spring security.
User Details Service - www.javadevjournal.com/spring....
Spring Security Authentication Providers- www.javadevjournal.com/spring...
Source code - github.com/javadevjournal/jav...
#sptingsecuritytutorial #springsecuritytutorials #springsecurity #springboot #springmvc #springframework #authenticationprovider #authenticationproviders #userdetailsservice

Пікірлер: 13
@sekhar4033
@sekhar4033 Жыл бұрын
Too good
@toshiroh5997
@toshiroh5997 2 жыл бұрын
Nice!
@javadevjournal
@javadevjournal 2 жыл бұрын
Thanks!
@lokeshreddy8557
@lokeshreddy8557 3 жыл бұрын
Nice
@javadevjournal
@javadevjournal 3 жыл бұрын
Thanks
@toshiroh5997
@toshiroh5997 2 жыл бұрын
Can I have multiple userdetailsservice implementations? If so, How could I add them to auth provider?
@javadevjournal
@javadevjournal 2 жыл бұрын
is it with 2 different endpoints? Alternatively, you can always have strategy based workflow inside your user-details service.
@toshiroh5997
@toshiroh5997 2 жыл бұрын
@@javadevjournal I had an idea similar to this strategy based workflow..., I created two service classes that have a method for searching for the user by username, then I came up with a userDetailsService and put a map... I switch between them inside the filter I created extending UsernamePasswordAuthenticationFilter, I passe a dto which has username, password and type, this type is the key for the map inside the UserDetailsService
@toshiroh5997
@toshiroh5997 2 жыл бұрын
@@javadevjournal do you think this is a good solution?
@javadevjournal
@javadevjournal 2 жыл бұрын
@@toshiroh5997 is there a reason you need 2 different user details services? We generally use it in case handling multiple entry points and want to handle them differently.
@toshiroh5997
@toshiroh5997 2 жыл бұрын
@@javadevjournal it's because the number of.columns in each user is different I dont know how to proceed
Spring Security Authentication
26:04
Java Development Journal
Рет қаралды 1,6 М.
spring security success handler
19:56
Java Development Journal
Рет қаралды 1,9 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 40 МЛН
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 36 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 33 МЛН
Introduction to spring security authentication providers
15:10
Java Development Journal
Рет қаралды 6 М.
[Spring Boot Security] #19 Database Authentication - Implement User Details Service
13:28
Dan Geabunea (Romanian Coder)
Рет қаралды 32 М.
Spring Boot Security - UserDetailsService & UserDetails
8:52
Teddy Smith
Рет қаралды 33 М.
Spring Boot + Spring Security + JWT from scratch - Java Brains
39:29
Spring Security Tutorial
1:06:32
Telusko
Рет қаралды 260 М.