/** * Print ascii art. * * @param out the out * @param asciiArt the ascii art */ public static void printAsciiArt(final PrintStream out, final String asciiArt) { printAsciiArt(out, asciiArt, null); }
/** * Handle application ready event. * * @param event the event */ @EventListener public void handleApplicationReadyEvent(final ApplicationReadyEvent event) { AsciiArtUtils.printAsciiArtInfo(LOGGER, "READY", StringUtils.EMPTY); LOGGER.info("Ready to process requests @ [{}]", DateTimeUtils.zonedDateTimeOf(event.getTimestamp())); }
@ConditionalOnMissingBean(name = "acceptUsersAuthenticationEventExecutionPlanConfigurer") @Bean @RefreshScope public AuthenticationEventExecutionPlanConfigurer acceptUsersAuthenticationEventExecutionPlanConfigurer() { return plan -> { if (StringUtils.isNotBlank(this.casProperties.getAuthn().getAccept().getUsers())) { val header = "\nCAS is configured to accept a static list of credentials for authentication. " + "While this is generally useful for demo purposes, it is STRONGLY recommended " + "that you DISABLE this authentication method (by setting 'cas.authn.accept.users' " + "to a blank value) and switch to a mode that is more suitable for production."; AsciiArtUtils.printAsciiArtWarning(LOGGER, "STOP!", header); plan.registerAuthenticationHandlerWithPrincipalResolver(acceptUsersAuthenticationHandler.getIfAvailable(), defaultPrincipalResolver.getIfAvailable()); } }; } }
/** * Handle application ready event. * * @param event the event */ @EventListener public void handleApplicationReadyEvent(final ApplicationReadyEvent event) { AsciiArtUtils.printAsciiArtInfo(LOGGER, "READY", StringUtils.EMPTY); LOGGER.info("Ready to process requests @ [{}]", DateTimeUtils.zonedDateTimeOf(event.getTimestamp())); } }
@Override public void printBanner(final Environment environment, final Class<?> sourceClass, final PrintStream out) { AsciiArtUtils.printAsciiArt(out, getTitle(), collectEnvironmentInfo(environment, sourceClass)); }