title: Oauth2 in Restlet with a JAXRS Application?
body: <p>I am trying to create a REST service (in JAX-RS) with Restlet which is protected by OAuth2. Our REST service has already been written with JAX-RS and after some investigation the Oauth2 implementation of Restlet seems to be the best.</p>
  
  <p>Anyone knows how to use OAuth2 from restlet with a jax-rs service (also in restlet if possible)?</p>
  
  <p>I have tried:</p>
  
  <pre><code>jaxRsApplication.setAuthenticator(new Authenticator() {
    public boolean authenticate(Request request, Response response) {
      OAuthAuthorizer auth = new OAuthAuthorizer("http://localhost:9090/oauth/validate");
      return auth.authorize(request, response);
    }
  });
  </code></pre>
  
  <p>but this doesn't seem to work.</p>