use of org.apereo.cas.authentication.principal.AbstractWebApplicationService in project cas by apereo.
the class DefaultCentralAuthenticationServiceTests method verifyProxyGrantingTicketHasRootAuthenticationAsPrincipal.
@Test
public void verifyProxyGrantingTicketHasRootAuthenticationAsPrincipal() {
val ctx = CoreAuthenticationTestUtils.getAuthenticationResult(getAuthenticationSystemSupport(), getService());
val ticket = getCentralAuthenticationService().createTicketGrantingTicket(ctx);
val serviceTicketId = getCentralAuthenticationService().grantServiceTicket(ticket.getId(), getService(), ctx);
val service = (AbstractWebApplicationService) serviceTicketId.getService();
assertEquals(service.getPrincipal(), ticket.getAuthentication().getPrincipal().getId());
}
Aggregations