CAS官方文档

2026/1/23 22:10:19

Build

git clone git@github.com:Jasig/java-cas-client.git cd java-cas-client mvn clean package

Please note that to be deployed in Maven Central, we mark a number of JARs as provided (related to JBoss and Memcache Clients). In order to build the clients, you must enable the commented out repositories in the appropriate pom.xml files in the modules

(cas-client-integration-jboss and cas-client-support-distributed-memcached) or follow the instructions on how to install the file manually.

Components

?

Core functionality, which includes CAS authentication/validation filters.

org.jasig.cas.client cas-client-core ${java.cas.client.version}

? Support for SAML functionality is provided by this dependency:

org.jasig.cas

cas-client-support-saml ${java.cas.client.version}

? Distributed proxy ticket caching with Ehcache is provided by this dependency:

org.jasig.cas

cas-client-support-distributed-ehcache ${java.cas.client.version}

? Distributed proxy ticket caching with Memcached is provided by this dependency:

org.jasig.cas

cas-client-support-distributed-memcached

${java.cas.client.version}

? Atlassian integration is provided by this dependency:

org.jasig.cas

cas-client-integration-atlassian ${java.cas.client.version}

? JBoss integration is provided by this dependency:

org.jasig.cas

cas-client-integration-jboss ${java.cas.client.version}

? Tomcat 6 integration is provided by this dependency:

org.jasig.cas

cas-client-integration-tomcat-v6 ${java.cas.client.version}

? Tomcat 7 is provided by this dependency:

org.jasig.cas

cas-client-integration-tomcat-v7 ${java.cas.client.version}

Configuration

Strategies

The client provides multiple strategies for the deployer to provide client settings. The following strategies are supported:

? ?

JNDI (JNDI)

Properties File (PROPERTY_FILE). The configuration is provided via an external properties file. The path may be specified in the web context as such:

configFileLocation

/etc/cas/file.properties

If no location is specified, by default /etc/java-cas-client.properties will be used.

? ? ?

System Properties (SYSTEM_PROPERTIES) Web Context (WEB_XML) Default (DEFAULT)

In order to instruct the client to pick a strategy, strategy name must be specified in the web application's context:

configurationStrategy DEFAULT

If no configurationStrategy is defined, DEFAULT is used which is a combination of WEB_XML andJNDI.

Client Configuration Using web.xml

The client can be configured in web.xml via a series of context-params and filter init-params. Each filter for the client has a required (and optional) set of properties. The filters are designed to look for these properties in the following way:

? ? ?

Check the filter's local init-params for a parameter matching the required property name. Check the context-params for a parameter matching the required property name.

If two properties are found with the same name in the init-params and the context-params, theinit-param takes precedence.

Note: If you're using the serverName property, you should note well that the fragment-URI (the stuff after the #) is not sent to the server by all browsers, thus the CAS client can't capture it as part of the URL. An example application that is protected by the client is available here.

org.jasig.cas.client.authentication.AuthenticationFilter

The AuthenticationFilter is what detects whether a user needs to be authenticated or not. If a user needs to be authenticated, it will redirect the user to the CAS server.

CAS Authentication Filter

org.jasig.cas.client.authentication.AuthenticationFilter

casServerLoginUrl

https://battags.ad.ess.rutgers.edu:8443/cas/login

serverName

http://www.acme-client.com

CAS Authentication Filter /*

Property Description

Defines the location of the CAS server login URL,

i.e. https://localhost:8443/cas/login

Required

casServerLoginUrl

Yes

serverName

The name of the server this application is hosted on. Service URL will be dynamically constructed using this, i.e.

Yes

https://localhost:8443 (you must include the protocol, but port is optional if it's a standard port).

The service URL to send to the CAS server,

No

i.e.https://localhost:8443/yourwebapp/index.html specifies whether renew=true should be sent to the CAS server. Valid values are eithertrue/false (or no value at all). Note No thatrenew cannot be specified as local init-paramsetting.

specifies whether gateway=true should be sent to the CAS server. Valid values are eithertrue/false (or no value at all)

No

service

renew

gateway

artifactParameterName

specifies the name of the request parameter on where to find the artifact No (i.e. ticket).

specifies the name of the request parameter

No

on where to find the service (i.e. service) Whether the client should auto encode the

No

service url. Defaults to true

Defines the url pattern to ignore, when intercepting authentication requests.

No

serviceParameterName

encodeServiceUrl

ignorePattern


CAS官方文档.doc 将本文的Word文档下载到电脑
搜索更多关于: CAS官方文档 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219