Teach-in Apereo CAS5.2.3 client Configuration

Source: Internet
Author: User
Tags cas json

Hugeo's CAS series: https://blog.csdn.net/u010588262/article/category/7548325
Demo Download: https://download.csdn.net/download/u010588262/10327539 Configuration Host


Download the official demo to retrofit

Https://github.com/cas-projects/cas-sample-java-webapp project Configuration

Official Demo Import Idea
Modify Web. XML, primarily the address of the CAS server and the address of the client

Configuring debugging

Note the configuration of the JRE here, I have a separate JDK and JRE on my computer, and there is a JRE folder inside the JDK, so let's use it in this https://blog.csdn.net/u010588262/article/details/ 79741626 The 3rd step of this JRE directory can be:

Otherwise the test will be an error when:
Client Registration

The last step, if you are anxious monkeys to start the test, you will encounter the following situation:

At the same time the server will have a warning, can be based on the warning to determine what domain name should be registered

This is because our client's domain name is not registered on the server, registration is very simple
Let's go back to the service side of the project, from overlays or Cas_war (do not get back to see the Server Configuration Blog bar https://blog.csdn.net/u010588262/article/details/79741626) Copy the Services directory into the project:

Added a JSON file:
File name according to the specification with Name-serviceid.json Bar, inside the content is also very good understanding:

-@class: Must be an implementation class for Org.apereo.cas.services.RegisteredService
-ServiceId: An expression describing a service that can be used to match one or more URL addresses
-Name: Service names
-ID: Globally unique flag
-EvaluationOrder: Define the order of execution for multiple services

At the same time, add the following in the application.properties to open the server to read the JSON configuration:

#开启识别json文件, default false
cas.serviceregistry.initfromjson=true
#自动扫描服务配置, enabled
by default Cas.serviceregistry.watcherenabled=true
#120秒扫描一遍
cas.serviceregistry.repeatinterval=120000
# Delay 15 seconds to open
#cas. serviceregistry.startdelay=15000
#资源加载路径
cas.serviceregistry.config.location= Classpath:/services

Here the client is OK, after the successful login is this:

To test multiple client single sign-on, divert is going to have to change the domain name one time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.