Closed hafizan closed 5 years ago
I tried it with the JS client from the demo and I can't reproduce your problem. I only have one log entry when I request the admin endpoint without authentication. Can you provide more information?
i use angular 6 for the frontend. and everytime request made, even for login, it will fire like logs above.
Can you send us your network monitor ? To see how many requests your client make
On Tue, 31 Jul 2018, 12:42 hafizan, notifications@github.com wrote:
i use angular 6 for the frontend. and everytime request made, even for login, it will fire like logs above.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/szerhusenBC/jwt-spring-security-demo/issues/88#issuecomment-409161048, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAHoA_wmTLNAiVOebgy9Vq83D77g-4dks5uMCaXgaJpZM4UYbA1 .
i try inspect network monitor for request. it looks like it send two request. one OPTIONS method and the other one POST, others request also same, if i send GET request it will together with OPTIONS. so each request become 2.
OK, this gives us the cause of two log entries. I still don't know why you have three of them. When I perform a request against my demo I only have one entry.
Perhaps this can help you handling the OPTIONS request:
https://github.com/szerhusenBC/jwt-spring-security-demo/issues/68
okay..thank you so much for this solution
@hafizan You're welcome ;) If it is okay I would close this ticket now.
Closed, because I published a complete new version.
i check log evertime the request made.. it will check 3 times. why is that? log: 2018-06-04 12:12:44.756 WARN 17534 --- [nio-8080-exec-5] o.z.s.JwtAuthenticationTokenFilter : couldn't find bearer string, will ignore the header 2018-06-04 12:12:44.756 INFO 17534 --- [nio-8080-exec-5] o.z.s.JwtAuthenticationTokenFilter : checking authentication for user null 2018-06-04 12:12:44.807 WARN 17534 --- [nio-8080-exec-6] o.z.s.JwtAuthenticationTokenFilter : couldn't find bearer string, will ignore the header 2018-06-04 12:12:44.807 INFO 17534 --- [nio-8080-exec-6] o.z.s.JwtAuthenticationTokenFilter : checking authentication for user null 2018-06-04 12:12:44.808 WARN 17534 --- [nio-8080-exec-7] o.z.s.JwtAuthenticationTokenFilter : couldn't find bearer string, will ignore the header 2018-06-04 12:12:44.808 INFO 17534 --- [nio-8080-exec-7] o.z.s.JwtAuthenticationTokenFilter : checking authentication for user null 2018-06-04 12:12:46.201 WARN 17534 --- [nio-8080-exec-8] o.z.s.JwtAuthenticationTokenFilter : couldn't find bearer string, will ignore the header 2018-06-04 12:12:46.201 INFO 17534 --- [nio-8080-exec-8] o.z.s.JwtAuthenticationTokenFilter : checking authentication for user null