1   package com.atlassian.plugins.rest.interceptor;
2   
3   import com.atlassian.plugins.rest.common.interceptor.InterceptorChain;
4   import com.atlassian.plugins.rest.common.security.AnonymousAllowed;
5   import com.atlassian.plugins.rest.common.security.AuthenticationContext;
6   
7   import javax.ws.rs.GET;
8   import javax.ws.rs.Path;
9   import javax.ws.rs.Produces;
10  import javax.ws.rs.core.Context;
11  import java.security.Principal;
12  
13  @Path("/interceptedResource")
14  @InterceptorChain({MessageInterceptor.class})
15  public class InterceptedResource
16  {
17      @GET
18      @Produces("text/xml")
19      public Message getMessage()
20      {
21          return new Message("Hello World");
22      }
23  }