@Bean
    @ConditionalOnMissingBean(name = "apnsClient")
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public ApnsClient apnsClient(final CasConfigurationProperties casProperties) throws Exception {
        val apnMessaging = casProperties.getApnMessaging();
        try (val p8File = apnMessaging.getAuthenticationKey().getLocation().getInputStream()) {
            return new ApnsClientBuilder()
                .setApnsServer(StringUtils.equalsIgnoreCase(apnMessaging.getServer(), "production")
                    ? ApnsClientBuilder.PRODUCTION_APNS_HOST
                    : ApnsClientBuilder.DEVELOPMENT_APNS_HOST)
                .setSigningKey(ApnsSigningKey.loadFromInputStream(p8File, apnMessaging.getTeamId(), apnMessaging.getKeyId()))
                .build();
        }
    }
This is {@link CasAPNMessagingAutoConfiguration}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-notifications-apn/src/main/java/org/apereo/cas/config/CasAPNMessagingAutoConfiguration.java