Service Access Strategy - Custom

If you wish to create your own access strategy and authorization policy enforcer, you will need to design a component and register it with CAS to handle the enforcement:

1
2
3
4
5
6
7
8
9
10
11
12
package org.apereo.cas;

@AutoConfiguration
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration {

    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public RegisteredServiceAccessStrategyEnforcer myEnforcer() {
        return new MyRegisteredServiceAccessStrategyEnforcer();
    }
}

See this guide to learn more about how to register configurations into the CAS runtime.