spring-boot-security-login icon indicating copy to clipboard operation
spring-boot-security-login copied to clipboard

{"path":"/error","error":"Unauthorized","message":"Full authentication is required to access this resource","status":401}

Open dqxbvt opened this issue 2 years ago • 6 comments

i always face this problem http://127.0.0.1:8080/api/auth/all

{"path":"/error","error":"Unauthorized","message":"Full authentication is required to access this resource","status":401}

dqxbvt avatar May 31 '23 17:05 dqxbvt

same error

codetobuild avatar Sep 15 '23 07:09 codetobuild

how to fix it

codetobuild avatar Sep 15 '23 07:09 codetobuild

There is no route: api/auth/all. We have api/test/all.

tienbku avatar Sep 15 '23 07:09 tienbku

same error

AhmedMasbah avatar Nov 10 '23 15:11 AhmedMasbah

Tried with /api/v1/auth/signup. Got same error, since filters are still working, even for .permitAll() routes. Adding this to JwtAuthFilter helped.

@Override
    protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
        String path = request.getRequestURI();
        return path.startsWith("/api/v1/auth/");
    }

Found on stack overflow

nonamekk avatar Feb 11 '24 21:02 nonamekk

where to implement thiscode ?

waelby99 avatar Feb 27 '24 22:02 waelby99