@Override
    protected Event doExecuteInternal(final RequestContext requestContext) throws Exception {
        val username = requestContext.getRequestParameters().get("username");
        if (StringUtils.isBlank(username)) {
            throw UnauthorizedServiceException.denied("Denied");
        }
        val graphics = repository.getGraphics(username);
        if (graphics == null || graphics.isEmpty()) {
            throw UnauthorizedServiceException.denied("Denied");
        }
        val image = EncodingUtils.encodeBase64ToByteArray(graphics.read());
        WebUtils.putGraphicalUserAuthenticationUsername(requestContext, username);
        WebUtils.putGraphicalUserAuthenticationImage(requestContext, new String(image, StandardCharsets.UTF_8));
        return success();
    }
This is {@link DisplayUserGraphicsBeforeAuthenticationAction}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-gua/src/main/java/org/apereo/cas/web/flow/DisplayUserGraphicsBeforeAuthenticationAction.java