use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class DefaultLogoutManagerTests method getService.
public static AbstractWebApplicationService getService(final String url) {
val request = new MockHttpServletRequest();
request.addParameter("service", url);
return (AbstractWebApplicationService) new WebApplicationServiceFactory().createService(request);
}
use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class DefaultSingleLogoutServiceLogoutUrlBuilderTests method getService.
public static AbstractWebApplicationService getService(final String url) {
val request = new MockHttpServletRequest();
request.addParameter("service", url);
return (AbstractWebApplicationService) new WebApplicationServiceFactory().createService(request);
}
use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class CentralAuthenticationServiceImplTests method verifyProxyGrantingTicketHasRootAuthenticationAsPrincipal.
@Test
public void verifyProxyGrantingTicketHasRootAuthenticationAsPrincipal() {
final AuthenticationResult ctx = CoreAuthenticationTestUtils.getAuthenticationResult(getAuthenticationSystemSupport(), getService());
final TicketGrantingTicket ticket = getCentralAuthenticationService().createTicketGrantingTicket(ctx);
final ServiceTicket serviceTicketId = getCentralAuthenticationService().grantServiceTicket(ticket.getId(), getService(), ctx);
final AbstractWebApplicationService service = AbstractWebApplicationService.class.cast(serviceTicketId.getService());
assertEquals(service.getPrincipal(), ticket.getAuthentication().getPrincipal().getId());
}
use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class SessionHealthIndicatorTests method getService.
public static AbstractWebApplicationService getService(final String name) {
val request = new MockHttpServletRequest();
request.addParameter("service", name);
return (AbstractWebApplicationService) new WebApplicationServiceFactory().createService(request);
}
use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class RegisteredServiceTestUtils method getService.
public static AbstractWebApplicationService getService(final String name) {
val request = new MockHttpServletRequest();
request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, name);
return (AbstractWebApplicationService) new WebApplicationServiceFactory().createService(request);
}
Aggregations