class LoginEvent {
    private final UserDetailService detailService;

    public LoginEvent(UserDetailService detailService) {
        this.detailService = detailService;
    }

    @EventListener
    public void handleLoginSuccess(AuthorizationSuccessEvent event) {<FILL_FUNCTION_BODY>}
}

        Map<String, Object> result = event.getResult();
        Authentication authentication = event.getAuthentication();
        List<Dimension> dimensions = authentication.getDimensions();

        result.put("permissions", authentication.getPermissions());
        result.put("roles", dimensions);
        result.put("currentAuthority", authentication.getPermissions().stream().map(Permission::getId).collect(Collectors.toList()));

        event.async(
            detailService
                .findUserDetail(event.getAuthentication().getUser().getId())
                .doOnNext(detail -> result.put("user", detail))
        );
    
<no_super_class>