private static GoogleCredentials getCredentials(
            final CasConfigurationProperties casProperties) throws Exception {
            val firebase = casProperties.getGoogleFirebaseMessaging();
            if (firebase.getServiceAccountKey().getLocation() != null) {
                val keyPath = firebase.getServiceAccountKey().getLocation().getFile().getCanonicalPath();
                try (val credentialsStream = new FileInputStream(keyPath)) {
                    return GoogleCredentials.fromStream(credentialsStream).createScoped(firebase.getScopes());
                }
            }
            return GoogleCredentials.getApplicationDefault();
        }
This is {@link CasGoogleFirebaseCloudMessagingAutoConfiguration}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-notifications-fcm/src/main/java/org/apereo/cas/config/CasGoogleFirebaseCloudMessagingAutoConfiguration.java