title: User authentication on a Jersey REST service
body: <p>I am developing a REST application, which is using the Jersey framework. I would like to know how I can control user authentication. I have searched many places, and the closest article I have found is this: <a href="http://weblogs.java.net/blog/2008/03/07/authentication-jersey" rel="noreferrer">http://weblogs.java.net/blog/2008/03/07/authentication-jersey</a>.</p>
  
  <p>However this article can only be used with a GlassFish server and an attached database. Is there anyway that I can implement an interface in Jersey and use it as a filter before reaching the requested REST resource?</p>
  
  <p>I want to use basic authentication right now, but it should be flexible enough such that I can change that at a later time.</p>