CAS 5.2.0 and OAuth

71 views
Skip to first unread message

Karl Banke

unread,
Apr 16, 2018, 8:40:19 AM4/16/18
to CAS Community
I am using CAS 5.2.0 and configured it for oauth. I created an Oauth Service and tried to use the implicit flow in order to access it from a single page web application.

I use the following URL

https://mycasserver/cas/oauth2.0/authorize?response_type=token&client_id=myclientid&redirect_uri=https%253A%252F%252Foauth2

This works well in that I am redirected to the login screen and properly enter my credentials, I am then redirected to

https://mycasserver/cas/login?service=https%3A%2F%2Fmycasserver%2Fcas%2Foauth2.0%2FcallbackAuthorize%3Fclient_name%3DCasOAuthClient%26client_id%3DclientId%26redirect_uri%3Dhttps%25253A%25252F%25252Foauth2%26response_type%3Dtoken

However this leads to an error in the application stating that my service is not defined.

ef2532b3bcdf 2018-04-16 11:56:14,682 WARN [org.apereo.cas.services.web.ServiceThemeResolver] - No registered service is found to match [org.apereo.cas.authentication.principal.SimpleWebApplicationServiceImpl@20f16ca[id=https%3A%2F%2Foauth2,originalUrl=https%3A%2F%2Foauth2,artifactId=<null>,principal=<null>,loggedOutAlready=false,format=XML]] or service access is disallowed. Using default theme [cas-theme-default]

The service exists and is configured with the correct serviceId "https://oauth2".

Is this a known bug? What can be done to fix the issue?

Andy Ng

unread,
Apr 17, 2018, 10:05:02 AM4/17/18
to CAS Community
The WARN message that you get is about "ServiceThemeResolver", doesn't means your service is not loaded, just your theme not loaded (i.e. you look is not loaded). The OAuth in general should be working in 5.2.0, since I am also using OAuth on 5.2.x.

As to how to fix this, 5.3.x will fix this issue. Meanwhile if you need to use 5.2.x and still use your theme, this might give you some insight: https://github.com/apereo/cas/pull/3273

Cheers!
- Andy
Reply all
Reply to author
Forward
0 new messages