Closed qifali closed 8 years ago
And the same as login through SAML
I fixed it by add follow codes in web.xml:
<servlet-mapping>
<servlet-name>cas</servlet-name>
<url-pattern>/oauth2.0/*</url-pattern>
</servlet-mapping>
in cas-pac4j-oauth-demo it doesn't include web.xml. Am I fixed the right way?
In 4.2, the controller should be registered automatically thanks to: https://github.com/apereo/cas/blob/4.2.x/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthServletContextListener.java
Did you test it via the Jetty Maven plugin or via a standard Tomcat (for example) installation?
thx @leleuj
I clone cas-pac4j-oauth-demo 4.2.x branche and open in intellij, use jdk 1.8 test via Jetty Maven plugin command : jetty:run, when i access : http://localhost:8080/cas/login and choice login with CasOAuthWrapper, it redirct to http://localhost:8080/cas2/login?client_id=xxx&client_secret=xxx&redirect_uri=xxx (it seems redirct to the wrong url),
then i input my username & password , it login success ,but in cas2 login success page, and the url not change, It seems /oauth2.0/* not registered automatically.
I clone 4.1.x branche, I see when use OauthWrapper link, it will redirect to the login page through url below: http://localhost:8080/cas2/login?service=http%3A%2F%2Flocalhost%3A8080%2Fcas2%2Foauth2.0%2FcallbackAuthorize
I'm Using cas-pac4j-oauth-demo 4.2.x branche and face a problem, when I choice CasOAuthWrapper and login on cas2, then login success, but it still in cas2 login success page and not redirect to the cas login success page, and i see the log output below:
I see use cas login works well ! But I need to support oauth ... Help, pls!