oauth-2.0casjasig

Redirection error with CAS Oauth authentication


I have a REST service that is running on https://localhost:9090. In order to provide token based authentication with Oauth2.0 for consumers of my REST service, I have cloned the 4.2 version of CAS from repository https://github.com/leleuj/cas-pac4j-oauth-demo and deployed only cas2.war (cas server) on tomcat 7. From the browser, I hit this URL :

https://localhost:8443/cas2/login?response_type=code&client_id=this_is_the_key&redirect_uri=https%3A%2F%2Flocalhost%3A9090%2Fv1%2Ffiles%2Fafb2265b-39e9-4172-bccc-e3f43700874e

I got the cas login page and after the successful login with valid credentials (leleuj::leleuj), I was not redirected to my service api as mentioned in the URL. Instead, the browser still shows the success cas login page. Is there something wrong in what I am doing? Sorry if this is a basic question, I am somewhat new to CAS.


Solution

  • As I'm leleuj on github, it feels a question for me ;-) Indeed, this doesn't work running mvn jetty:run, but if you run the webapps in Tomcat, it works, I haven't investigated more as CAS 5 is out now!