Skip to content
This repository has been archived by the owner. It is now read-only.
Annotation-based configuration support for Apereo CAS Java clients
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.



The code from this project has been merged into official Apereo Java CAS client library as a module. The maintenance of this project has been discontinued. Please see Official CAS client module

Library providing annotation-based configuration support for CAS Java clients. Primarily designed for super easy CASification of Spring Boot apps.

This project was developed as part of Unicon's Open Source Support program. Professional Support / Integration Assistance for this module is available. For more information visit.

Current version



  • Define a dependency:




dependencies {
      compile 'net.unicon.cas:cas-client-autoconfig-support:2.3.0-GA'
  • Add the following required properties

in Spring Boot's or application.yml Example:

  • Annotate Spring Boot application (or any @Configuration class) with @EnableCasClient annotation
    public class MyApplication { .. }

For CAS3 protocol (authentication and validation filters) - which is default if nothing is specified


For CAS2 protocol (authentication and validation filters)


For SAML protocol (authentication and validation filters)


Available optional properties

  • cas.authentication-url-patterns
  • cas.validation-url-patterns
  • cas.request-wrapper-url-patterns
  • cas.assertion-thread-local-url-patterns
  • cas.gateway
  • cas.use-session
  • cas.redirect-after-validation
  • cas.allowed-proxy-chains
  • cas.proxy-callback-url
  • cas.proxy-receptor-url
  • cas.accept-any-proxy
  • server.context-parameters.renew

Advanced configuration

This library does not expose ALL the CAS client configuration options via standard Spring property sources, but only most commonly used ones. If there is a need however, to set any number of not exposed, 'exotic' properties, there is a way: just extend CasClientConfigurerAdapter class in your @EnableCasClient annotated class and override appropriate configuration method(s) for CAS client filter(s) in question. For example:

    class CasProtectedApplication extends CasClientConfigurerAdapter {    
        void configureValidationFilter(FilterRegistrationBean validationFilter) {           
            validationFilter.getInitParameters().put("millisBetweenCleanUps", "120000");
        void configureAuthenticationFilter(FilterRegistrationBean authenticationFilter) {
            authenticationFilter.getInitParameters().put("artifactParameterName", "casTicket");
            authenticationFilter.getInitParameters().put("serviceParameterName", "targetService");
You can’t perform that action at this time.