public static Map<String, Object> buildEventAttributeMap(final Principal principal,
                                                             final Optional<Service> service,
                                                             final Optional<RegisteredService> registeredService,
                                                             final MultifactorAuthenticationProvider provider) {
        val map = new HashMap<String, Object>();
        map.put(Principal.class.getName(), principal);
        registeredService.ifPresent(svc -> map.put(RegisteredService.class.getName(), svc));
        service.ifPresent(svc -> map.put(Service.class.getName(), svc));
        map.put(MultifactorAuthenticationProvider.class.getName(), provider);
        return map;
    }
Build event attribute map.

@param principal         the principal
@param service           the service
@param registeredService the service
@param provider          the provider
@return the map
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationUtils.java