• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CasArgumentExtractor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jasig.cas.web.support.CasArgumentExtractor的典型用法代码示例。如果您正苦于以下问题:Java CasArgumentExtractor类的具体用法?Java CasArgumentExtractor怎么用?Java CasArgumentExtractor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CasArgumentExtractor类属于org.jasig.cas.web.support包,在下文中一共展示了CasArgumentExtractor类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    this.warnCookieGenerator = new CookieRetrievingCookieGenerator();
    this.warnCookieGenerator.setCookiePath("");
    this.tgtCookieGenerator = new CookieRetrievingCookieGenerator();
    this.tgtCookieGenerator.setCookiePath("");
    this.action.setTicketGrantingTicketCookieGenerator(this.tgtCookieGenerator);
    this.action.setWarnCookieGenerator(this.warnCookieGenerator);
    final ArgumentExtractor[] argExtractors = new ArgumentExtractor[] {new CasArgumentExtractor()};
    this.action.setArgumentExtractors(Arrays.asList(argExtractors));

    this.servicesManager = mock(ServicesManager.class);
    when(this.servicesManager.findServiceBy(any(Service.class))).thenReturn(TestUtils.getRegisteredService("test"));
    this.action.setServicesManager(this.servicesManager);

    this.action.afterPropertiesSet();
}
 
开发者ID:xuchengdong,项目名称:cas4.1.9,代码行数:18,代码来源:InitialFlowSetupActionTests.java


示例2: testServiceWithNoAttributeValue

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Test
public void testServiceWithNoAttributeValue() {
    final List<ArgumentExtractor> set = new ArrayList<>();
    set.add(new CasArgumentExtractor());
    
    final MultiFactorWebApplicationServiceFactory factory = mock(MultiFactorWebApplicationServiceFactory.class);
    final AuthenticationMethodVerifier verifier = mock(AuthenticationMethodVerifier.class);

    final RegisteredService svc = TestUtils.getRegisteredService(CAS_SERVICE);
    final DefaultRegisteredServiceProperty prop = new DefaultRegisteredServiceProperty();
    svc.getProperties().put(MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD, prop);
    
    final ServicesManager mgmr = mock(ServicesManager.class);
    when(mgmr.findServiceBy(anyInt())).thenReturn(svc);
    when(mgmr.findServiceBy(any(Service.class))).thenReturn(svc);
    
    final RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor extractor = 
            new RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor(set, factory, mgmr, verifier);
    
    final MultiFactorAuthenticationSupportingWebApplicationService webSvc =
            (MultiFactorAuthenticationSupportingWebApplicationService) extractor.extractService(getRequest());
    assertNull(webSvc);
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:24,代码来源:RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractorTests.java


示例3: testServiceWithDifferentServiceType

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Test
public void testServiceWithDifferentServiceType() {
    final List<ArgumentExtractor> set = new ArrayList<>();
    set.add(new CasArgumentExtractor());
    
    final MultiFactorWebApplicationServiceFactory factory = mock(MultiFactorWebApplicationServiceFactory.class);
    final AuthenticationMethodVerifier verifier = mock(AuthenticationMethodVerifier.class);
    
    final RegisteredService svc = mock(RegisteredService.class);
    when(svc.getId()).thenReturn(0L);
    when(svc.getServiceId()).thenReturn(CAS_SERVICE);
    
    final ServicesManager mgmr = mock(ServicesManager.class);
    when(mgmr.findServiceBy(anyInt())).thenReturn(svc);
    when(mgmr.findServiceBy(any(Service.class))).thenReturn(svc);
    
    final RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor extractor = 
            new RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor(set, factory, mgmr, verifier);

    final MultiFactorAuthenticationSupportingWebApplicationService webSvc =
            (MultiFactorAuthenticationSupportingWebApplicationService) extractor.extractService(getRequest());
    assertNull(webSvc);
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:24,代码来源:RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractorTests.java


示例4: verifyFindService

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Test
public void verifyFindService() {
    final SamlArgumentExtractor openIdArgumentExtractor = new SamlArgumentExtractor();
    final CasArgumentExtractor casArgumentExtractor = new CasArgumentExtractor();
    final ArgumentExtractor[] argumentExtractors = new ArgumentExtractor[] {
            openIdArgumentExtractor, casArgumentExtractor};
    final MockHttpServletRequest request = new MockHttpServletRequest();
    request.setParameter("service", "test");

    final Service service = WebUtils.getService(Arrays
            .asList(argumentExtractors), request);

    assertEquals("test", service.getId());
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:15,代码来源:WebUtilTests.java


示例5: onSetUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void onSetUp() throws Exception {
    final StaticApplicationContext context = new StaticApplicationContext();
    context.refresh();
    this.serviceValidateController = new ServiceValidateController();
    this.serviceValidateController.setCentralAuthenticationService(getCentralAuthenticationService());
    final Cas20ProxyHandler proxyHandler = new Cas20ProxyHandler();
    proxyHandler.setHttpClient(new SimpleHttpClientFactoryBean().getObject());
    this.serviceValidateController.setProxyHandler(proxyHandler);
    this.serviceValidateController.setApplicationContext(context);
    this.serviceValidateController.setArgumentExtractor(new CasArgumentExtractor());
    this.serviceValidateController.setServicesManager(this.servicesManager);
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:14,代码来源:AbstractServiceValidateControllerTests.java


示例6: setUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    this.warnCookieGenerator = new CookieRetrievingCookieGenerator();
    this.tgtCookieGenerator = new CookieRetrievingCookieGenerator();
    this.action.setTicketGrantingTicketCookieGenerator(this.tgtCookieGenerator);
    this.action.setWarnCookieGenerator(this.warnCookieGenerator);
    final ArgumentExtractor[] argExtractors = new ArgumentExtractor[] {new CasArgumentExtractor()};
    this.action.setArgumentExtractors(Arrays.asList(argExtractors));

    this.servicesManager = mock(ServicesManager.class);
    when(this.servicesManager.findServiceBy(any(Service.class))).thenReturn(TestUtils.getRegisteredService("test"));
    this.action.setServicesManager(this.servicesManager);

    this.action.afterPropertiesSet();
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:16,代码来源:InitialFlowSetupActionTests.java


示例7: testFindService

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Test
public void testFindService() {
    final SamlArgumentExtractor openIdArgumentExtractor = new SamlArgumentExtractor();
    final CasArgumentExtractor casArgumentExtractor = new CasArgumentExtractor();
    final ArgumentExtractor[] argumentExtractors = new ArgumentExtractor[] {
            openIdArgumentExtractor, casArgumentExtractor};
    final MockHttpServletRequest request = new MockHttpServletRequest();
    request.setParameter("service", "test");

    final Service service = WebUtils.getService(Arrays
            .asList(argumentExtractors), request);

    assertEquals("test", service.getId());
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:15,代码来源:WebUtilTests.java


示例8: setUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    this.warnCookieGenerator = new CookieRetrievingCookieGenerator();
    this.warnCookieGenerator.setCookiePath("");
    this.tgtCookieGenerator = new CookieRetrievingCookieGenerator();
    this.tgtCookieGenerator.setCookiePath("");
    this.action.setTicketGrantingTicketCookieGenerator(this.tgtCookieGenerator);
    this.action.setWarnCookieGenerator(this.warnCookieGenerator);
    final ArgumentExtractor[] argExtractors = new ArgumentExtractor[] {new CasArgumentExtractor()};
    this.action.setArgumentExtractors(Arrays.asList(argExtractors));
    this.action.afterPropertiesSet();
    this.action.afterPropertiesSet();
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:14,代码来源:InitialFlowSetupActionTests.java


示例9: onSetUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void onSetUp() throws Exception {
    StaticApplicationContext context = new StaticApplicationContext();
    context.refresh();
    this.serviceValidateController = new ServiceValidateController();
    this.serviceValidateController.setCentralAuthenticationService(getCentralAuthenticationService());
    final Cas20ProxyHandler proxyHandler = new Cas20ProxyHandler();
    proxyHandler.setHttpClient(new SimpleHttpClient());
    this.serviceValidateController.setProxyHandler(proxyHandler);
    this.serviceValidateController.setApplicationContext(context);
    this.serviceValidateController.setArgumentExtractor(new CasArgumentExtractor());
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:13,代码来源:ServiceValidateControllerTests.java


示例10: setUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    this.servicesManager = new DefaultServicesManagerImpl(new InMemoryServiceRegistryDaoImpl());

    this.serviceThemeResolver = new ServiceThemeResolver();
    this.serviceThemeResolver.setDefaultThemeName("test");
    this.serviceThemeResolver.setServicesManager(this.servicesManager);
    this.serviceThemeResolver.setArgumentExtractors(Arrays.asList((ArgumentExtractor) new CasArgumentExtractor()));
    final Map<String, String> mobileBrowsers = new HashMap<String, String>();
    mobileBrowsers.put("Mozilla", "theme");
    this.serviceThemeResolver.setMobileBrowsers(mobileBrowsers);
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:13,代码来源:ServiceThemeResolverTests.java


示例11: setUp

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    this.warnCookieGenerator = new CookieRetrievingCookieGenerator();
    this.tgtCookieGenerator = new CookieRetrievingCookieGenerator();
    this.action.setTicketGrantingTicketCookieGenerator(this.tgtCookieGenerator);
    this.action.setWarnCookieGenerator(this.warnCookieGenerator);
    final ArgumentExtractor[] argExtractors = new ArgumentExtractor[] {new CasArgumentExtractor()};
    this.action.setArgumentExtractors(Arrays.asList(argExtractors));
    this.action.afterPropertiesSet();
    this.action.afterPropertiesSet();
}
 
开发者ID:kevin3061,项目名称:cas-4.0.1,代码行数:12,代码来源:InitialFlowSetupActionTests.java


示例12: testServiceWithDefaultMfaAttribute

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
@Test
public void testServiceWithDefaultMfaAttribute() {
    final List<ArgumentExtractor> set = new ArrayList<>();
    set.add(new CasArgumentExtractor());
    
    final MultiFactorWebApplicationServiceFactory factory = mock(MultiFactorWebApplicationServiceFactory.class);
    when(factory.create(anyString(), anyString(), anyString(), any(Response.ResponseType.class),
            anyString(), any(AuthenticationMethodSource.class)))
        .thenReturn(getMfaService());
    
    final AuthenticationMethodVerifier verifier = mock(AuthenticationMethodVerifier.class);

    final RegisteredService svc = TestUtils.getRegisteredService(CAS_SERVICE);
    final DefaultRegisteredServiceProperty prop = new DefaultRegisteredServiceProperty();
    prop.setValues(Collections.singleton(CAS_AUTHN_METHOD));
    svc.getProperties().put(MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD, prop);
    
    final ServicesManager mgmr = mock(ServicesManager.class);
    when(mgmr.findServiceBy(anyInt())).thenReturn(svc);
    when(mgmr.findServiceBy(any(Service.class))).thenReturn(svc);
    
    final RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor extractor = 
            new RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractor(set, factory, mgmr, verifier);

    final MultiFactorAuthenticationSupportingWebApplicationService webSvc =
            (MultiFactorAuthenticationSupportingWebApplicationService) extractor.extractService(getRequest());
    assertNotNull(webSvc);
    assertEquals(webSvc.getAuthenticationMethod(), CAS_AUTHN_METHOD);
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:30,代码来源:RegisteredServiceAttributeMultiFactorAuthenticationArgumentExtractorTests.java


示例13: RequestParameterMultiFactorAuthenticationArgumentExtractorTests

import org.jasig.cas.web.support.CasArgumentExtractor; //导入依赖的package包/类
public RequestParameterMultiFactorAuthenticationArgumentExtractorTests() {
    this.supportedArgumentExtractors = new ArrayList<>();
    this.supportedArgumentExtractors.add(new CasArgumentExtractor());
    this.supportedArgumentExtractors.add(new SamlArgumentExtractor());
    this.mfaWebApplicationServiceFactory = new DefaultMultiFactorWebApplicationServiceFactory();
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:7,代码来源:RequestParameterMultiFactorAuthenticationArgumentExtractorTests.java



注:本文中的org.jasig.cas.web.support.CasArgumentExtractor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Owner类代码示例发布时间:2022-05-22
下一篇:
Java HttpMessages类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap