WORKERS AHEAD!
You are viewing the development documentation for the Apereo CAS server. The functionality presented here is not officially released yet. This is a work in progress and will be continually updated as development moves forward. To view the documentation for a specific Apereo CAS server release, please choose an appropriate version. The release schedule is also available here.
Custom Service Registry
If you wish to design your own implementation of a service registry, you will need to inject your implementation into CAS as such:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.apereo.cas.support;
@Configuration("myConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration implements ServiceRegistryExecutionPlanConfigurer {
@Bean
@RefreshScope
public ServiceRegistryDao serviceRegistry() {
...
}
@Override
public void configureServiceRegistry(final ServiceRegistryExecutionPlan plan) {
plan.registerServiceRegistry(serviceRegistry());
}
}
At a minimum, your overlay will need to include the following modules:
implementation "org.apereo.cas:cas-server-core-services:${project.'cas.version'}"
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-core-services</artifactId>
<version>${cas.version}</version>
</dependency>
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-core-services"
}
See this guide to learn more about how to register configurations into the CAS runtime.