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 @GET 17 @Produces("text/xml") 18 public Message getMessage() { 19 return new Message("Hello World"); 20 } 21 }