Is it possible to trigger an event when uninstalling my plugin, considering I use Spring Boot and Atlassian Connect?
If so, is there a method to retrieve the email address, user, or any related information about the user who uninstalled the plugin?
Thank you for your assistance!
Hello Tarik, I don’t have a solution to this your problem, but out of the box what if you have a middleware that fetches user information on every request and maybe check out the atlassian life cycle events…
More importantly I want to connect
with you I am new to developing addons without forge, and I want to use Java spring boot to do my backend, can you help me out on how you go about it?
Welcome to the Atlassian community @TarikBENALIAMAR,
Yes, Atlassian Connect lifecycle events include uninstalled
. You may find the Atlassian Spring Boot library automatically handles this event so you would have to override the default.
@TarikBENALIAMAR please see the section Reacting to add-on lifecycle events of the atlassian-connect-spring-boot README.
In your @EventListener
, you should be able to read the security context normally:
Optional<AtlassianHostUser> atlassianHostUser = Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication())
.map(Authentication::getPrincipal)
.filter(AtlassianHostUser.class::isInstance)
.map(AtlassianHostUser.class::cast);
Please let us know if that doesn’t work.
2 Likes