Skip to content
Snippets Groups Projects

Remove Sentry trigger endpoint

1 file
+ 0
12
Compare changes
  • Side-by-side
  • Inline
package nl.tudelft.ewi.tam.controllers;
package nl.tudelft.ewi.tam.controllers;
import nl.tudelft.ewi.tam.beans.UserPrincipal;
import nl.tudelft.ewi.tam.beans.UserPrincipal;
import nl.tudelft.ewi.tam.exceptions.SentryException;
import nl.tudelft.ewi.tam.services.UserService;
import nl.tudelft.ewi.tam.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -49,14 +47,4 @@ public class HomeController {
@@ -49,14 +47,4 @@ public class HomeController {
// If the user is not authenticated, then send him to the index page.
// If the user is not authenticated, then send him to the index page.
return "index.html";
return "index.html";
}
}
/**
* Test method for the Sentry integration.
*
* @throws SentryException to test the connection.
*/
@GetMapping("/trigger-sentry")
public void triggerSentryException() throws SentryException {
throw new SentryException("This should be logged from TAM.");
}
}
}
Loading