gothinkster / spring-boot-realworld-example-app

Example Spring codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.
MIT License
1.3k stars 677 forks source link

Problem with jwt auth #11

Closed relio closed 3 years ago

relio commented 5 years ago

Hi all! I have tried to set up the realworld example putting together Aurelia.io front end + Spring-boot. I have changed the application.properties in this way:

server.port: 3000 management.server.port: 3001 management.server.address: 127.0.0.1

because the default 8080 was already busy. Starting the application, I get the error below but I wasn't able to figure out why. It seems that front end is trying to talk in https with an http backend but I have not found in the documentation any reference about an https setting of Spring boot. For sure I'm not understanding how to deal with jwt auth but I do not what.

Thanks in advance!

2018-10-09 23:19:18.060 DEBUG 12424 --- [nio-3000-exec-3] o.a.tomcat.util.net.SocketWrapperBase : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@79d7edb9:org.apache.tomcat.util.net.NioChannel@39a1e54c:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:3000 remote=/0:0:0:0:0:0:0:1:37248]], Read from buffer: [0] 2018-10-09 23:19:18.060 DEBUG 12424 --- [nio-3000-exec-3] o.a.coyote.http11.Http11InputBuffer : Received [ÿæµn=/ŧ/5 z

ÿ ost# hhttp/1.1 

zz] 2018-10-09 23:19:18.060 DEBUG 12424 --- [nio-3000-exec-3] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:426) ~[tomcat-embed-core-8.5.28.jar:8.5.28] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687) ~[tomcat-embed-core-8.5.28.jar:8.5.28] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.28.jar:8.5.28] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.28.jar:8.5.28] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.28.jar:8.5.28] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.28.jar:8.5.28] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.28.jar:8.5.28] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]