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. You are most encouraged to test the changes presented.
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;
@AutoConfiguration
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration implements ServiceRegistryExecutionPlanConfigurer {
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
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:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-core-services</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-core-services:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
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.