@Override
    protected Event doExecuteInternal(final RequestContext requestContext) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext);
        val context = buildAuthenticationContext(requestContext);
        securityContextRepository.ifAvailable(secContext -> secContext.saveContext(context, request, response));
        SecurityContextHolder.setContext(context);
        return null;
    }
This is {@link PopulateSpringSecurityContextAction}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-actions-core/src/main/java/org/apereo/cas/web/flow/PopulateSpringSecurityContextAction.java