本文整理汇总了Java中org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler类的典型用法代码示例。如果您正苦于以下问题:Java Cas10ProxyHandler类的具体用法?Java Cas10ProxyHandler怎么用?Java Cas10ProxyHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Cas10ProxyHandler类属于org.jasig.cas.ticket.proxy.support包,在下文中一共展示了Cas10ProxyHandler类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: verifyValidServiceTicketWithValidPgtNoProxyHandling
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithValidPgtNoProxyHandling() throws Exception {
final AuthenticationContext ctx = org.jasig.cas.authentication.TestUtils
.getAuthenticationContext(getAuthenticationSystemSupport(), SERVICE);
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(ctx);
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), SERVICE, ctx);
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", SERVICE.getId());
request.addParameter("ticket", sId.getId());
request.addParameter("pgtUrl", "https://www.github.com");
assertEquals(AbstractServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:21,代码来源:AbstractServiceValidateControllerTests.java
示例2: verifyValidServiceTicketWithInvalidPgt
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithInvalidPgt() throws Exception {
final AuthenticationContext ctx = org.jasig.cas.authentication.TestUtils
.getAuthenticationContext(getAuthenticationSystemSupport(), SERVICE);
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(ctx);
final ServiceTicket sId = getCentralAuthenticationService().grantServiceTicket(tId.getId(),
SERVICE, ctx);
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", SERVICE.getId());
request.addParameter("ticket", sId.getId());
request.addParameter("pgtUrl", "duh");
final ModelAndView modelAndView = this.serviceValidateController.handleRequestInternal(request, new MockHttpServletResponse());
assertEquals(AbstractServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME, modelAndView.getViewName());
assertNull(modelAndView.getModel().get("pgtIou"));
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:21,代码来源:AbstractServiceValidateControllerTests.java
示例3: verifyValidServiceTicketWithDifferentEncodingAndIgnoringCase
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithDifferentEncodingAndIgnoringCase() throws Exception {
final String origSvc = "http://www.jasig.org?param=hello+world";
final Service svc = org.jasig.cas.authentication.TestUtils.getService(origSvc);
final AuthenticationContext ctx = org.jasig.cas.authentication.TestUtils
.getAuthenticationContext(getAuthenticationSystemSupport(), svc);
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(ctx);
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), svc, ctx);
final String reqSvc = "http://WWW.JASIG.ORG?PARAM=hello%20world";
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", org.jasig.cas.authentication.TestUtils.getService(reqSvc).getId());
request.addParameter("ticket", sId.getId());
assertEquals(AbstractServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:26,代码来源:AbstractServiceValidateControllerTests.java
示例4: verifyValidServiceTicketWithDifferentEncoding
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithDifferentEncoding() throws Exception {
final Service svc = org.jasig.cas.authentication.TestUtils.getService("http://www.jasig.org?param=hello+world");
final AuthenticationContext ctx = org.jasig.cas.authentication.TestUtils
.getAuthenticationContext(getAuthenticationSystemSupport(), svc);
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(ctx);
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), svc, ctx);
final String reqSvc = "http://www.jasig.org?param=hello%20world";
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", org.jasig.cas.authentication.TestUtils.getService(reqSvc).getId());
request.addParameter("ticket", sId.getId());
assertEquals(AbstractServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:23,代码来源:AbstractServiceValidateControllerTests.java
示例5: verifyValidServiceTicketWithValidPgtNoProxyHandling
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithValidPgtNoProxyHandling() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), TestUtils.getService());
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService().getId());
request.addParameter("ticket", sId.getId());
request.addParameter("pgtUrl", "https://www.github.com");
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:18,代码来源:AbstractServiceValidateControllerTests.java
示例6: verifyValidServiceTicketWithInvalidPgt
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithInvalidPgt() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final ServiceTicket sId = getCentralAuthenticationService().grantServiceTicket(tId.getId(), TestUtils.getService());
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService().getId());
request.addParameter("ticket", sId.getId());
request.addParameter("pgtUrl", "duh");
final ModelAndView modelAndView = this.serviceValidateController.handleRequestInternal(request, new MockHttpServletResponse());
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME, modelAndView.getViewName());
assertNull(modelAndView.getModel().get("pgtIou"));
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:17,代码来源:AbstractServiceValidateControllerTests.java
示例7: verifyValidServiceTicketWithDifferentEncodingAndIgnoringCase
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithDifferentEncodingAndIgnoringCase() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final String origSvc = "http://www.jasig.org?param=hello+world";
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), TestUtils.getService(origSvc));
final String reqSvc = "http://WWW.JASIG.ORG?PARAM=hello%20world";
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService(reqSvc).getId());
request.addParameter("ticket", sId.getId());
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:21,代码来源:AbstractServiceValidateControllerTests.java
示例8: verifyValidServiceTicketWithDifferentEncoding
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithDifferentEncoding() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final TicketGrantingTicket tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final String origSvc = "http://www.jasig.org?param=hello+world";
final ServiceTicket sId = getCentralAuthenticationService()
.grantServiceTicket(tId.getId(), TestUtils.getService(origSvc));
final String reqSvc = "http://www.jasig.org?param=hello%20world";
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService(reqSvc).getId());
request.addParameter("ticket", sId.getId());
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:21,代码来源:AbstractServiceValidateControllerTests.java
示例9: testValidServiceTicketWithValidPgtNoProxyHandling
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void testValidServiceTicketWithValidPgtNoProxyHandling() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final String tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final String sId = getCentralAuthenticationService()
.grantServiceTicket(tId, TestUtils.getService());
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService().getId());
request.addParameter("ticket", sId);
request.addParameter("pgtUrl", "https://www.github.com");
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME,
this.serviceValidateController.handleRequestInternal(request,
new MockHttpServletResponse()).getViewName());
}
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:18,代码来源:ServiceValidateControllerTests.java
示例10: testValidServiceTicketWithInsecurePgtUrl
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void testValidServiceTicketWithInsecurePgtUrl() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final String tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final String sId = getCentralAuthenticationService().grantServiceTicket(tId, TestUtils.getService());
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService().getId());
request.addParameter("ticket", sId);
request.addParameter("pgtUrl", "http://www.github.com");
final ModelAndView modelAndView = this.serviceValidateController
.handleRequestInternal(request, new MockHttpServletResponse());
assertEquals(ServiceValidateController.DEFAULT_SERVICE_FAILURE_VIEW_NAME, modelAndView.getViewName());
}
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:18,代码来源:ServiceValidateControllerTests.java
示例11: testValidServiceTicketWithInvalidPgt
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void testValidServiceTicketWithInvalidPgt() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final String tId = getCentralAuthenticationService()
.createTicketGrantingTicket(TestUtils.getCredentialsWithSameUsernameAndPassword());
final String sId = getCentralAuthenticationService().grantServiceTicket(tId, TestUtils.getService());
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("service", TestUtils.getService().getId());
request.addParameter("ticket", sId);
request.addParameter("pgtUrl", "duh");
final ModelAndView modelAndView = this.serviceValidateController.handleRequestInternal(request, new MockHttpServletResponse());
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME, modelAndView.getViewName());
assertNull(modelAndView.getModel().get("pgtIou"));
}
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:17,代码来源:ServiceValidateControllerTests.java
示例12: verifyValidServiceTicketWithSecurePgtUrl
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithSecurePgtUrl() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final ModelAndView modelAndView = getModelAndViewUponServiceValidationWithSecurePgtUrl();
assertEquals(AbstractServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME, modelAndView.getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:8,代码来源:AbstractServiceValidateControllerTests.java
示例13: verifyValidServiceTicketWithSecurePgtUrl
import org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler; //导入依赖的package包/类
@Test
public void verifyValidServiceTicketWithSecurePgtUrl() throws Exception {
this.serviceValidateController.setProxyHandler(new Cas10ProxyHandler());
final ModelAndView modelAndView = getModelAndViewUponServiceValidationWithSecurePgtUrl();
assertEquals(ServiceValidateController.DEFAULT_SERVICE_SUCCESS_VIEW_NAME, modelAndView.getViewName());
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:8,代码来源:AbstractServiceValidateControllerTests.java
注:本文中的org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论