CAS-Client客户端研究(六)-各种过滤器参数说明

上面很多文章都是说一些原理性的东西,大家可能更关心如果使用,那么来介绍一下各个过滤器需要那些参数,以及这些参数什么意思(摘自官方wiki:https://wiki.jasig.org/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml):

org.jasig.cas.client.authentication.AuthenticationFilter

<filter>
  <filter-name>CAS Authentication Filter</filter-name>
  <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
  <init-param>
    <param-name>casServerLoginUrl</param-name>
    <param-value></param-value>
  </init-param>
  <init-param>
    <param-name>serverName</param-name>
    <param-value></param-value>
  </init-param>
</filter>

Required Properties

Optional Properties

  • renew - specifies whether renew=true should be sent to the CAS server. Valid values are either "true" or "false" (or no value at all).
  • gateway - specifies whether gateway=true should be sent to the CAS server. Valid values are either "true" or "false" (or no value at all).
  • artifactParameterName - specifies the name of the request parameter on where to find the artifact (i.e. "ticket").
  • serviceParameterName - specifies the name of the request parameter on where to find the service (i.e. "service").
org.jasig.cas.client.authentication.Saml11AuthenticationFilter

<filter>
  <filter-name>CAS Authentication Filter</filter-name>
  <filter-class>org.jasig.cas.client.authentication.Saml11AuthenticationFilter</filter-class>
  <init-param>
    <param-name>casServerLoginUrl</param-name>
    <param-value></param-value>
  </init-param>
</filter>

Required Properties

Optional Properties

  • renew - specifies whether renew=true should be sent to the CAS server. Valid values are either "true" or "false" (or no value at all).
  • gateway - specifies whether gateway=true should be sent to the CAS server. Valid values are either "true" or "false" (or no value at all).
  • artifactParameterName - specifies the name of the request parameter on where to find the artifact (i.e. "SAMLArt").
  • serviceParameterName - specifies the name of the request parameter on where to find the service (i.e. "TARGET").
org.jasig.cas.client.validation.Cas10TicketValidationFilter

<filter>
  <filter-name>CAS Validation Filter</filter-name>
  <filter-class>org.jasig.cas.client.validation.Cas10TicketValidationFilter</filter-class>
  <init-param>
    <param-name>casServerUrlPrefix</param-name>
    <param-value></param-value>
  </init-param>
</filter>

Required Properties

  • casServerUrlPrefix - the start of the CAS server URL, i.e. https://localhost:8443/cas.
  • serverName - the server name of the server this application is hosted on. Service URL will be dynamically constructed using this, i.e. https://localhost:8443(you must include the protocol, but port is optional if it's a standard port).

Optional Properties

  • redirectAfterValidation (default: true) - whether to redirect to the same URL after ticket validation, but without the ticket in the parameter.
  • useSession (default: true) - whether to store the Assertion in session or not. If sessions are not used, tickets will be required for each request.
  • exceptionOnValidationFailure (default: true) - whether to throw an exception or not on ticket validation failure.
  • renew (default: false) - specifies whether renew=true should be sent to the CAS server. Valid values are either "true" or "false"

org.jasig.cas.client.validation.Saml11TicketValidationFilter

<filter>
  <filter-name>CAS Validation Filter</filter-name>
  <filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class>
  <init-param>
    <param-name>casServerUrlPrefix</param-name>
    <param-value></param-value>
  </init-param>
</filter>

Required Properties

Optional Properties

  • redirectAfterValidation (default: true) - whether to redirect to the same URL after ticket validation, but without the ticket in the parameter.
  • useSession (default: true) - whether to store the Assertion in session or not. If sessions are not used, tickets will be required for each request.
  • exceptionOnValidationFailure (default: true) - whether to throw an exception or not on ticket validation failure.
  • tolerance (default: 1000 mSec) - the tolerance for drifting clocks when validating SAML tickets. Note that 10 seconds should be more than enough for most environments that have NTP time synchronization.
  • renew (default: false) - specifies whether renew=true should be sent to the CAS server. Valid values are either "true" or "false" (NOTE: Available as of version 3.1.6.)
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter
<filter>
  <filter-name>CAS Validation Filter</filter-name>
  <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
  <init-param>
    <param-name>casServerUrlPrefix</param-name>
    <param-value></param-value>
  </init-param>
  <init-param>
    <param-name>serverName</param-name>
    <param-value></param-value>
  </init-param>
</filter>

Required Properties

  • casServerUrlPrefix - the start of the CAS server URL, i.e. https://localhost:8443/cas.
  • serverName - the start of the URL that this application is running on. Service URL will be dynamically constructed using this, i.e. https://localhost:8443 (you must include the protocol, but port is optional if it's a standard port). Service URL is passed to the CAS server for ticket validation.

Optional Properties

  • redirectAfterValidation (default: true) - whether to redirect to the same URL after ticket validation, but without the ticket in the parameter.
  • useSession (default: true) - whether to store the Assertion in session or not. If sessions are not used, tickets will be required for each request.
  • exceptionOnValidationFailure (default: true) - whether to throw an exception or not on ticket validation failure.
  • proxyReceptorUrl (default: null) - the URL to watch for PGTIOU/PGT responses from the CAS server. Should be defined from the root of the context. For example, ff your application is deployed in /cas-client-app and you want the proxy receptor URL to be /cas-client-app/my/receptor you need to configure proxyReceptorUrl to be /my/receptor
  • renew (default: false) - specifies whether renew=true should be sent to the CAS server. Valid values are either "true" or "false."
  • acceptAnyProxy (default: false) - specifies whether any proxy is OK.
  • allowedProxyChains (default: null) - specifies the proxy chain. Each acceptable proxy chain should include a space-separated list of URLs. Each acceptable proxy chain should appear on its own line.
  • proxyCallbackUrl (default: none) - the callback URL to provide the CAS server to accept Proxy Granting Tickets.
  • proxyGrantingTicketStorageClass (@since 3.1.9) (default: none) - specify an implementation of the ProxyGrantingTicketStorage class that has a no-arg constructor.
org.jasig.cas.client.util.HttpServletRequestWrapperFilter
<filter>
  <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
  <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>


org.jasig.cas.client.util.AssertionThreadLocalFilter
<filter>
  <filter-name>CAS Assertion Thread Local Filter</filter-name>
  <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
</filter>

Required Properties
None

Optional Properties
None




转载于:https://my.oschina.net/abcijkxyz/blog/708445

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值