Hello just wondering on which class we are generating cookie, I know how we can change cookie name and other configs but can you point me where exactly we are creating cookie and setting it to response. Also does this cookie creation logic remains same on oauth2 flow as well. thanks in advance.
@grcurzon3 жыл бұрын
Explanation is good. Thanks
@javadevjournal3 жыл бұрын
Thanks!!!
@sagarsri41434 жыл бұрын
Superb 👌
@javadevjournal4 жыл бұрын
Thanks!!!
@Lukas-dw8jm3 жыл бұрын
I have a problem, does anyone know how I can free up the static resources of the login page? I already released the configure method (WebSecurity web) and added ("/ resources / **", "/ static / **") but it still didn't work, I read it in the documentation and says to do the same, but I don't know why that is not working.
@javadevjournal3 жыл бұрын
What is the issue you are facing? resources not loading? if possible, create a small GitHub repo with your sample code and we can look in to it.
@Lukas-dw8jm3 жыл бұрын
@@javadevjournal thank you man, the problem is the resources are not loading and i don't understand why being that i did the same shows your video and how it is in the documentation. segue o link do git: github.com/Lukasrsv/Resources
@javadevjournal3 жыл бұрын
@@Lukas-dw8jm I did not run the code but looking at the code on GitHub, I can see that you are using the @EnableWebMvc annotation. Please note that with the @EnableWebMvc annotation, Spring Boot auto configuration will not be activated automatically. Check this out docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc-auto-configuration. I will suggest to remove the @EnableWebMvc annotationand let Spring Boot do work for you until you want to control it yourself else you can use WebMvcConfigurer to customize the behavior.
@Lukas-dw8jm3 жыл бұрын
@@javadevjournal Good morning, so I did what you said, I removed the @EnableWebMvc annotation, but it's still not working.
@javadevjournal3 жыл бұрын
@@Lukas-dw8jm Let me take a look at your GitHub code? I see you have added lot of annotation there, any reason for that? like you are specifying explicit component scan etc?
@sarvavideovice42093 жыл бұрын
Hi bro I want to pass Username, Password and one selectoption value How can i get the value inside loadUserByUsername method. PLease reply me bro
@javadevjournal3 жыл бұрын
Still not sure what is your requirement, in any case, you can extend the UsernamePasswordAuthenticationFilter to handle those additional parameters. They will be part of the HTTP request and it's up to you as how do you want to use them (ma be store in session or somewhere)
@sarvavideovice42093 жыл бұрын
@@javadevjournal Thank you bro I will explain my requirement in my login Page I want to pass three input parameters 1.Compamyid 2. Username, 3 password based on this three value authentication needs work brother please suggest me if any possible way to do this
@javadevjournal3 жыл бұрын
@@sarvavideovice4209 Yes, As suggested use the Filter to combine both username and company id and than in your userdetails service, you can use same logic to split both the information to run your logic. This is the most simple option we have
@sarvavideovice42093 жыл бұрын
@@javadevjournal sure bro I will try that way thanks for your suggestion can you please put video regarding this requirement it will help more people 😊
@yaserrasheed23903 жыл бұрын
One doubt. in CustomUserDetailService.java you are calling User.withUsername(... What is the User class, I could not see it in the tutorial
@javadevjournal3 жыл бұрын
User class is provide by Spring security to represent the User and withUsername is the method in the builder. Take a look at org.springframework.security.core.userdetails.User to see how this class look like