JSON service configuration

There are many ways by which a client/service can register itself to a CAS server. We will be using JSON configuration here and have already included dependencies to our pom.xml file in the earlier step. Apart from JSON, other formats such as YAML, Mongo, LDAP and others do exist.

Create a new folder named clients in the src/main/resources folder. Create a new file in the newly created folder with the following content:

--- !<org.apereo.cas.services.RegexRegisteredService>
serviceId: "^(http?|https?)://.*"
name: "YAML"
id: 5000
description: "description"
attributeReleasePolicy: !<org.apereo.cas.services.ReturnAllAttributeReleasePolicy> {}
accessStrategy: !<org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy>
enabled: true
ssoEnabled: true

Save the file with the name newYmlFile-5000.yml. Let's go into the details of a couple of important attributes:

  • serviceIdURL, in a regular expression pattern, of clients who want to connect to the CAS server. In our example, we refer to a client Spring Boot application running on port 9090, which connects to the CAS server.
  • id: unique identifier for this configuration.

Other configurable attributes are documented in the official website at https://goo.gl/CGsDp1.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.139.42