public static void createCredential(final RequestContext requestContext) {
        removeCredential(requestContext);
        val flow = (Flow) requestContext.getActiveFlow();
        val flowVariable = flow.getVariable(CasWebflowConstants.VAR_ID_CREDENTIAL);
        if (flowVariable != null) {
            flowVariable.create(requestContext);
        }
    }
Create credential.

@param requestContext the request context
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java