[Spring Boot Security] #19 Database Authentication - Implement User Details Service

  Рет қаралды 32,491

Dan Geabunea (Romanian Coder)

Dan Geabunea (Romanian Coder)

Күн бұрын

⚫ Description
In this Spring Boot Security episode you will learn how to create a custom User Details Service that will retrieve user information from your database in order to perform authentication.
_______
⚫ Source code
github.com/dangeabunea/Romani...
_______
Check out the latest software programming articles on my blog, where you will find lots of software development tutorials that will sharpen your programming skills
www.romaniancoder.com
_______
⚫ Say hi on social
Facebook: / romaniancoder
Twitter: / romaniancoder
GitHub:github.com/dangeabunea
#springboot #spring #java #webapplication #security #springsecurity #springbootsecurity #dangeabunea
_______
Created with ❤️ by Dan Geabunea (Romanian Coder)

Пікірлер: 17
@Lukas-di1cw
@Lukas-di1cw 3 жыл бұрын
You are doing a great job with those short video snippets! Very helpful! Thanks! :))
@websimo1000
@websimo1000 5 жыл бұрын
It's very very good , God Blast You ! it the first time I understand the concept of spring security whit you ,your explain and you flow the steeps by steeps Thanks Sir !
@DanielBRLima
@DanielBRLima 4 жыл бұрын
Another excellent video! Awesome!
@mostinho7
@mostinho7 4 жыл бұрын
Done thanks Todo Rewatch and take notes Implementing UserDetailsService and UserDetails UserDetails implementation class just takes our user JPA entity and uses it to return values from the UserDetails methods
@AlexSenichek
@AlexSenichek 3 жыл бұрын
Nice one. Thank you.
@momedalhouma14
@momedalhouma14 4 жыл бұрын
getAuthorities() should be written in a different way, you can use collect in place of modifiying the list in a lambda expression. Yes everytime we hear that it was just for explaining something and not in a real world, but when can we learn the best practice if not when learning? beside that your playlist is very well explained.
@mabt-tech
@mabt-tech 5 жыл бұрын
hi . i really like your videos .but why you have such a directory in most of the spring boot vids .. db , controller , ect .. can you please name them more seperatly because thats much clearer for begginers .. me and my class mates watch your videos and we learn alot but when it came to the directory... the one we use in university is much easier : service,controller,dao,entities,repository,...ect keep up the good work & thank you ❤👌
@grantmurphy7965
@grantmurphy7965 5 жыл бұрын
How would I go about retrieving the current logged in user by id? Pass a getId into the userDetails or the loadbyusername method? SO in the controller I have User user = (User)SecurityContextHolder.getContext().getAuthentication().getPrincipal(); model.addAttribute("username", user); Then retrieve in thymeleaf with something like Name
@mohanbera2044
@mohanbera2044 4 жыл бұрын
In the database suppose I have multiple users with same username but different password. Then how I can get the correct user by the username and password. Here you are getting the user by its username only. But I need to fetch the user by its username and password both in the userdetails. How can I do this?
@dillynlakey6420
@dillynlakey6420 2 жыл бұрын
usually you cant make an account with an existing username
@pemifo260
@pemifo260 13 күн бұрын
that is plain stupid. but if you are still using that approach you are going to get all users with the same username and you are going to get that one distinct user which request password and password hash match.
@avinashkafle
@avinashkafle 5 жыл бұрын
Why not use @Autowire instead ? while creating User dependency ? EDIT: Is there a way to use @Autowire for parameterize constructor?
@RomanianCoder
@RomanianCoder 5 жыл бұрын
You could use @autowired. But it is not best practice. Better to declare dependencies inbthe conatructor.
@zaaap0
@zaaap0 4 жыл бұрын
Autowire constructor and add object as parameter
@AndriusLau
@AndriusLau 3 жыл бұрын
Can User(Entity) directly implement UserDetails?
@GidzPaul
@GidzPaul 3 жыл бұрын
Not advised to mix database models and the domain models.
@zaaap0
@zaaap0 4 жыл бұрын
this. in decorator methods is obsolete
[Spring Boot Security] #20 Database Authentication - Configure Database Provider
14:04
Dan Geabunea (Romanian Coder)
Рет қаралды 20 М.
1,000 Diamonds! (Funny Minecraft Animation) #shorts #cartoon
00:31
toonz CRAFT
Рет қаралды 39 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 114 МЛН
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 4,7 МЛН
Spring Boot + Spring Security + LDAP from scratch - Java Brains
18:16
How Spring Security Authentication works - Java Brains
19:36
Java Brains
Рет қаралды 297 М.
Spring Security Tutorial
1:06:32
Telusko
Рет қаралды 260 М.
Vision Pro наконец-то доработали! Но не Apple!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 172 М.
Мой новый мега монитор!🤯
1:00
Корнеич
Рет қаралды 126 М.
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 971 М.
İĞNE İLE TELEFON TEMİZLEMEK!🤯
0:17
Safak Novruz
Рет қаралды 2,1 МЛН