I have implemented authorization_code grant flow which works fine when my Auth Server is run locally.
A client is getting redirect
With the original problem still remaining a mystery I got the implementation finally working (not a proper solution though). Below is the complete setup
I tried packaging and running application as a jar but then faced issues with loading JSPs. For this some solutions suggested to place all the JSPs under /src/main/resources/META-INF/resources/WEB-INF/jsp
folder. But in my case I couldn't get it working.
As a solution instead of packaging the application as a jar I packaged it as a WAR with JSPs in their default and ran it as a jar with embedded Apache Tomcat
versioned 8.5.27 (Spring Boot 1.5.10.RELEASE)
For running JSPs over Tomcat below was added in the pom file
Note : Some solutions I came across suggested <scope>
to be valued provided
. In my case it worked without it. Explicitly mentioning it as commented below.
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<!--<scope>provided</scope>-->
</dependency>
I hope this is helpful in case someone stumbles upon the same problem. Any answers/comments are welcome.