I have a resource class for Jersey rest endpoints in Jetty like so..
@Path("/reports")
public class ReportResource {
@GET
@Path("{dept: finance|marketing}")
public String getByDept(@PathParam("dept") String dept) {
ReportNameListPage page = new ReportNameListPage(dept);
return page.generatePage();
}
..
more get methods
This serves up dynamic pages at /reports/finance, /reports/marketing, etc in
a REST style with Jersey.
I tried to add @RequiresAuthentication to the @Get method like so:
@GET
@Path("{dept: finance|marketing}")
@RequiresAuthentication
public String getByDept(@PathParam("dept") String dept) {
ReportNameListPage page = new ReportNameListPage(dept);
return page.generatePage();
}
but this does not redirect to my login page or challenge in any way. Is
this the correct approach to secure a Jersey/REST resource with Shiro?
Thanks
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/Securing-Jersey-resouces-with-Shiro-tp7225690p7225690.html
Sent from the Shiro User mailing list archive at Nabble.com.