How To Find LDAP User Login Details in Spring Boot part -2 | Spring boot ldap Login User details

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to Talent developer in this video we are going to learn how to find the ldap login user detail in last video we saw how to do ldap authentication in a spring Boot and it is continu series of ldap in spring board so with the help of last video we learn how to create the ldap authentication so you can see I'm having a user in our ldap server and the user CN is here Ram so now what we can do just come here and try to put the CN and our password was 1 2 3 4 5 6 you can see it is working fine now our challenge is like how to find which user is currently loging in L tab so what you can do we have to create one API and that API we will try to access once the user login is successful so just come copy this one and now we can change here get user details copy this one now we need to pass one spring security class that that is called authentication so just come and type here authentication let's try to import you have to import from security. core only always a spring having a feature like there's one class that is called user detail and with the help of authentication we can easily get the user details so just come and type here user details and you can create object equal to now we have to do type casting and after that use AU authentication dot get principal now you can import your user details so this class will contain all the user detail but this will work only if the user login is already successful so if you open this one you can see they have get password get username is account non-expired each account nonl they have so many things so what we can do just come and we will try to get some value so I can say here access user details on a string and let's try to get first username username equal to you can copy this one dot get user name now let's try to check like that account is non-expired or not so what we can do we have to use Boolean account non-expired equal to user details do each account non-expired so for now I'm just going to access only two variable now what you can do so in the return let's change user details username then new line account non expired and try to pass that Boolean let's try to sh down your server again restart I will try to access this API and I want to see what will be happen if I try to access before the login just come reload and instead of login try to do this one so you can see it will automatically redirect to the login page now try to enter username as a ram and our password was 1 2 3 4 5 6 so you can see here we are getting output like user details equal to RAM and account is non-expired is true so in this video we'll learn how to get the user details in ldap springbot application so in the next video we will learn something more in ldap with the springboard that's it for the day bye happy [Music] coding
Info
Channel: Talented Developer
Views: 991
Rating: undefined out of 5
Keywords: How To Find LDAP User Login Details in Spring Boot, Spring boot ldap login user details, ldap, spring boot security, active directory, spring security, ldap spring boot, spring boot ldap login user, User Authentication using Spring LDAP, Spring Security LDAP Authentication Example, Understanding LDAP through the Spring Boot, LDAP authentication using spring boot, How to find ldap user login details in spring boot using, How to check user login in Spring Boot, spring ldap tutorial
Id: c7oHdzmOfZo
Channel Id: undefined
Length: 3min 54sec (234 seconds)
Published: Wed Jan 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.