Skip to main content


Using Casdoor as CAS server

Casdoor now can be used as CAS server. Up to now the casdoor have supported the feature of CAS3.0 .


The prefix of CAS endpoint in Casdoor is <Endpoint of casdoor>/cas/<organization name>/<application name>,which means:

Suppose the endpoint of Casdoor is, which contains an application called cas-java-app which belongs to an organization called casbin, and if we are trying to let user to login in via CAS, then

  • /login endpoint:
  • /logout endpoint:
  • /serviceValidate endpoint:
  • /proxyValidate endpoint:
  • /proxy endpoint:
  • /validate endpoint:
  • /p3/serviceValidate endpoint:
  • /p3/proxyValidate endpoint:
  • /samlValidate endpoint:

See for more information about CAS and its different versions, as well as parameters for these endpoints.

An example

Here is an offical example, which contains an example web app utlizing the offical CAS java client By going through this example we will illustarte how to connect to Casdoor via CAS.


Note: Currently Casdoor only support all three versions of CAS: CAS 1.0 & 2.0 & CAS 3.0 .

The cas configuration is located in src/main/webapp/WEB-INF/web.yml.

By default, this app use CAS 3.0, which is specified by the following configurations.

<filter-name>CAS Validation Filter</filter-name>

Suppose you want to protect this web app via CAS 2.0, you are supposed to change CAS Validation Filter to the following content.

<filter-name>CAS Validation Filter</filter-name>

If you want to use CAS 1.0, use

<filter-name>CAS Validation Filter</filter-name>

For all the apperances of parameter 'casServerUrlPrefix', change them to


For all the apperances of parameter 'casServerLoginUrl' change them to


If you need to customize more configurations, see for detailed information.


Actually we have already have this demo app run on You can visit here to experience using Casdoor via CAS.