public class JsonServiceRegistryDao
extends org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao
ServiceRegistryDao that reads services definition from JSON
configuration file at the Spring Application Context initialization time. JSON files are
expected to be found inside a directory location and this registry will recursively look through
the directory structure to find relevant JSON files. Files are expected to have the
extension. An example of the JSON file is included here:
{
"@class" : "RegexRegisteredService",
"id" : 103935657744185,
"description" : "This is the application description",
"serviceId" : "https://app.school.edu",
"name" : "testSaveAttributeReleasePolicyAllowedAttrRulesAndFilter",
"theme" : "testtheme",
"proxyPolicy" : {
"@class" : "RegexMatchingRegisteredServiceProxyPolicy",
"pattern" : "https://.+"
},
"enabled" : true,
"ssoEnabled" : false,
"evaluationOrder" : 1000,
"usernameAttributeProvider" : {
"@class" : "DefaultRegisteredServiceUsernameProvider"
},
"logoutType" : "BACK_CHANNEL",
"requiredHandlers" : [ "java.util.HashSet", [ "handler1", "handler2" ] ],
"attributeReleasePolicy" : {
"@class" : "ReturnAllowedAttributeReleasePolicy",
"attributeFilter" : {
"@class" : "RegisteredServiceRegexAttributeFilter",
"pattern" : "\\w+"
},
"allowedAttributes" : [ "java.util.ArrayList", [ "uid", "sn", "cn" ] ]
}
}
| Constructor and Description |
|---|
JsonServiceRegistryDao(java.nio.file.Path configDirectory,
boolean enableWatcher,
org.springframework.context.ApplicationEventPublisher eventPublisher)
Instantiates a new Json service registry dao.
|
JsonServiceRegistryDao(org.springframework.core.io.Resource configDirectory,
boolean enableWatcher,
org.springframework.context.ApplicationEventPublisher eventPublisher)
Instantiates a new Json service registry dao.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getExtension() |
delete, destroy, findServiceById, findServiceById, load, load, makeFile, save, size, toString, updatefindServiceByExactServiceId, getName, publishEvent, setEventPublisherpublic JsonServiceRegistryDao(java.nio.file.Path configDirectory,
boolean enableWatcher,
org.springframework.context.ApplicationEventPublisher eventPublisher)
DefaultRegisteredServiceJsonSerializer by default.configDirectory - the config directory where service registry files can be found.enableWatcher - the enable watchereventPublisher - the event publisherpublic JsonServiceRegistryDao(org.springframework.core.io.Resource configDirectory,
boolean enableWatcher,
org.springframework.context.ApplicationEventPublisher eventPublisher)
throws java.lang.Exception
DefaultRegisteredServiceJsonSerializer by default.configDirectory - the config directory where service registry files can be found.enableWatcher - the enable watchereventPublisher - the event publisherjava.lang.Exception - the IO exception