I know I've brought this up before, but....

I'm trying to work through developing a a restlet server that allows users to 
log on and access protected resources, but unless I'm missing something, there 
is no sane documentation and no working sample code.

I'm doing my best to chug through, but unless I'm missing something obvious, 
this is really an area that could use some serious attention.

If someone does know of something I'm missing, I'd really appreciate it.


THE DOCS
---------------

OAuth is not covered in the new book, which is a major bummer. I'm not a huge 
fan of OAuth, but it's everywhere, so it needs some coverage.

The ericson docs are impossible.

The documentation here: 
http://wiki.restlet.org/docs_2.1/13-restlet/28-restlet/392-restlet.html

are littered with errors. Just to take one example, this code snippet:

public class MyProtectedApplication extends Application{
  public synchronized Restlet createInboundRoot(){
    Router root = new Router(getContext());
    OAuthAuthorizer auth = new OAuthAuthorizer("yourServerValidateURI", 
"yourServerAuthURI);
    List <Roles> roles = new ArrayList <Role> ();
    roles.add(new Role("status", null));
    auth.addAuthorizedRoles(roles);
    auth.setNext(ServerResource.class);
    root.attachRoute("/status", auth);
  }
}

is missing closing quotes after yourServerAuthURI, and is missing a return 
statement. I can work with those kinds of error, but it gets worse: there is no 
two argument constructor to OAuthAuthorizer. 

Overall these docs are very hard to follow.


SAMPLE CODE
------------------

So I tried downloading the sample code and it's hard to know where to begin. 
After digging through the code I figured out what some working URLs might be, 
but eventually I get to a point where it says

   Connection Error

   Unable to establish a connection to www.mellowtech.org/213.65.6.214:8095

Indeed there are references to mellowtech.org in the code. It appears to be 
providing an oauth service that the sample code depends on.

It /seems/ like this could be made to work by changing references to this 
server to a constant and making a note in a readme that the user should change 
that constant to something (probably localhost), which I'm going to try, 



-----------------------------
Bjorn Roche
http://www.xonami.com
Audio Collaboration
http://blog.bjornroche.com

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3010809

Reply via email to