in teamcity-invitations-plugin-server/src/main/java/org/jetbrains/teamcity/invitations/InvitationsLandingController.java [55:68]
protected ModelAndView doHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws Exception {
String token = request.getParameter(TOKEN_URL_PARAM);
Invitation invitation = core.runAsSystem(() -> invitations.getInvitation(token));
if (invitation == null) {
Loggers.SERVER.warn("Request with unknown invitation token received: " + WebUtil.getRequestDump(request));
return new ModelAndView(core.getPluginResourcesPath("invitationLanding.jsp"), Collections.singletonMap("title", "Invitation not found"));
}
if (invitation.getValidationError() != null) {
Loggers.SERVER.warn("User tries to accept the invitation '" + token + "' that is invalid: " + invitation.getValidationError());
}
request.getSession().setAttribute(TeamCityInternalKeys.FIRST_LOGIN_REDIRECT_URL,
InvitationsProceedController.PATH + "?token=" + token);
return invitation.processInvitationRequest(request, response);
}