Can’t figure out why my loginController can’t authenticate the user. Spring Security driving me nuts
Here is the error I’m getting:
Bad Request when accessing Spring app from public domain
I have the following resource structure in my spring application and I am referring to my files in html like this.
Facing a spring boot security configuration error
I am creating a user login with verification. But when i was doing the security part i met with an issue.
protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .authorizeRequests() .antMatchers("/auth/login", "/auth/signup", "/auth/verify").permitAll() .antMatchers(HttpMethod.GET, "/movies/**").permitAll() .anyRequest().authenticated() .and() .addFilter(jwtTokenFilter, UsernamePasswordAuthenticationFilter.class);
Here i get the error of,
“The method addFilter(Filter) in the type HttpSecurity is not applicable for the arguments (JwtTokenFilter, Class)”
PermitAll() is not working for homepage(Spring boot security)
I have a Spring Boot application where I am using multiple projects with Eureka Server. i am trying to access the homepage though the consumer application with the help of Eureka Server but somehow its asking for authentication.
when i provide the login details it redirects me to http://localhost:8082/WEB-INF/pages/homepage.jsp?continue But when i change the URL after the authorization to http://localhost:8082/homepage it displays the Home page(i tried to change the URL before authentication but it doesn’t work it simply redirects me to default login page of Spring Security)
Spring Security always 403 forbidden
I am developing a web app with spring security and have an issue with roles
requests are always forbidden even if user have apropriate role
Spring Boot Multiple Type User Authentication with Spring Security System and JWT
ifferent types of users, but I don’t want to create different roles for them. Instead, I will have two different tables: one for staff and one for users. These two types of users will be authenticated with a username and password. Authentication will be handled by separate APIs: one for staff (/api/v1/auth/staff
) and one for users (/api/v1/auth/user
). After successful authentication, the APIs will be structured as /api/v1/staff/* and /api/v1/students/*.
Migration to jdk17, spring 6 and springboot 3
I have to upgrade my project from jdk 11 to 17, springboot 2.7.18 to 3.x and spring 5.3.34 to 6.x
Please give me an rough idea how should I proceed step by step.
401 Unauthorized Spring boot with postman
some can help, I don’t understand why when I put this URL “http://localhost:8080/auth/register” or other one, always send me 401 Unauthorized
I have seen a video of youtube and i have followed all the steps and nothing.
I don’t know what to do, this are some of my codes:
Spring Security – Configuration
I’m having a difficult time configuring Spring Security. I’m trying to allow for some routes to be accessible without authentication and secure other routes however .permitAll and .hasRole don’t appear to have an impact on my code. Can someone explain to me what I’m doing wrong and how to resolve it? Thank you. Attached is a snippet of my code.