帮酷LOGO
0 0 评论
文章标签:JAVA  BASE  APE  annotation  CAS  SUP  ann  Clients  
Annotation-based configuration support for Apereo CAS Java clients

  • 源代码名称:cas-client-autoconfig-support
  • 源代码网址:http://www.github.com/Unicon/cas-client-autoconfig-support
  • cas-client-autoconfig-support源代码文档
  • cas-client-autoconfig-support源代码下载
  • Git URL:
    git://www.github.com/Unicon/cas-client-autoconfig-support.git
  • Git Clone代码到本地:
    git clone http://www.github.com/Unicon/cas-client-autoconfig-support
  • Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/Unicon/cas-client-autoconfig-support
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
  • cas-client-autoconfig-support

    为CAS Java客户端提供基于注释的配置支持的库,

    这个项目是作为Unicon的开源支持程序的一部分开发,提供此模块的专业支持/集成帮助,了解更多信息访问

    当前版本

    1.6.0-GA

    用法

    • 定义一个依赖项:

    Maven :

    <dependency>
     <groupId>net.unicon.cas</groupId>
     <artifactId>cas-client-autoconfig-support</artifactId>
     <version>1.6.0-GA</version> 
    </dependency>

    Gradle :

    dependencies {
     ...
     compile 'net.unicon.cas:cas-client-autoconfig-support:1.6.0-GA'...
    }
    • 添加下列必需属性

    在引导或application.yml例子的spring application.properties中:

     cas.server-url-prefix=https://cashost.com/cas
     cas.server-login-url=https://cashost.com/cas/login
     cas.client-host-url=https://casclient.com
    • 使用@EnableCasClient注释注释Spring Boot应用程序(或任何@Configuration类)
    @SpringBootApplication@Controller@EnableCasClientpublicclassMyApplication { .. }

    对于CAS3协议(验证和验证过滤器),如果没有指定任何内容,则默认为,

     cas.validation-type=CAS3

    CAS2协议(认证和验证过滤器)

     cas.validation-type=CAS

    对于SAML协议(认证和验证过滤器)

     cas.validation-type=SAML

    可用的可选属性

    • cas.authentication-url-patterns
    • cas.validation-url-patterns
    • cas.request-wrapper-url-patterns
    • cas.assertion-thread-local-url-patterns
    • cas.gateway
    • cas.use-session
    • cas.redirect-after-validation
    • cas.allowed-proxy-chains
    • cas.proxy-callback-url
    • cas.proxy-receptor-url
    • cas.accept-any-proxy
    • server.context-parameters.renew

    高级配置

    仅在@EnableCasClient注释类中扩展CasClientConfigurerAdapter类,并重写有关CAS客户端筛选器的适当配置方法,例如:

    @SpringBootApplication@EnableCasClientclassCasProtectedApplicationextendsCasClientConfigurerAdapter { 
     @OverridevoidconfigureValidationFilter(FilterRegistrationBeanvalidationFilter) { 
     validationFilter.getInitParameters().put("millisBetweenCleanUps", "120000");
     } 
     @OverridevoidconfigureAuthenticationFilter(FilterRegistrationBeanauthenticationFilter) {
     authenticationFilter.getInitParameters().put("artifactParameterName", "casTicket");
     authenticationFilter.getInitParameters().put("serviceParameterName", "targetService");
     } 
     }


    文章标签:JAVA  BASE  SUP  CAS  ann  annotation  Clients  APE  

    Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语