code: static void ensurePrincipalAccessIsAllowedForService(final ServiceTicket serviceTicket,
                                                           final RegisteredService registeredService,
                                                           final TicketGrantingTicket ticketGrantingTicket,
                                                           final boolean retrievePrincipalAttributesFromReleasePolicy)
          throws UnauthorizedServiceException, PrincipalException {
          ensurePrincipalAccessIsAllowedForService(serviceTicket.getService(),
              registeredService, ticketGrantingTicket.getAuthentication(), retrievePrincipalAttributesFromReleasePolicy);
      }
docs: Ensure service access is allowed.
  
  @param serviceTicket                                the service ticket
  @param registeredService                            the registered service
  @param ticketGrantingTicket                         the ticket granting ticket
  @param retrievePrincipalAttributesFromReleasePolicy the retrieve principal attributes from release policy
  @throws UnauthorizedServiceException the unauthorized service exception
  @throws PrincipalException           the principal exception