@Override
    protected List<UserProfile> loadProfiles(final CallContext callContext, final ProfileManager manager, final List<Client> clients) {
        val request = ((JEEContext) callContext.webContext()).getNativeRequest();
        val ticketGrantingTicket = getTicketGrantingTicket(manager, request);
        val statelessAuthentication = OAuth20Utils.isStatelessAuthentication(manager);
        if (ticketGrantingTicket != null || statelessAuthentication) {
            return super.loadProfiles(callContext, manager, clients);
        }
        LOGGER.debug("No ticket-granting ticket => No user profiles found");
        return new ArrayList<>();
    }
Specific OAuth security logic to "synchronize the CAS and pac4j sessions".

@author Jerome LELEU
@since 6.5.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20TicketGrantingTicketAwareSecurityLogic.java