Re: CAS authentication in Restlet server

2009-11-09 Thread Rhett Sutphin
Hi Arjohn,

On Nov 7, 2009, at 4:31 AM, Arjohn Kampman wrote:

> I'm planning to integrate CAS (proxy) authentication in my Restlet- 
> based
> server. Has anyone worked on this before? Any suggestions on how to  
> best
> implement this?

I have done this for my Restlet-based API.  I can point you to the  
code[1], but since the application is a redistributable webapp which  
supports several authentication plugins, the implementation is  
probably more indirect than you need.  Also, please note that my  
experience is with Restlet 1.1 only so far -- I haven't tried to  
update this application to 2.0.

If I were adding support for just CAS, I would define a new challenge  
scheme (call it something like cas_proxy_ticket) and define a Guard  
and AuthenticationHelper pair which handle this scheme.  This would  
mean that a client would need to acquire a proxy ticket and then  
include it in the HTTP request as the Authentication header, something  
like

Authentication: cas_proxy_ticket PT-123456789

Rhett

[1]: 
https://ncisvn.nci.nih.gov/svn/psc/trunk/web/src/main/java/edu/northwestern/bioinformatics/studycalendar/restlets/PscGuard.java
 
  and 
https://ncisvn.nci.nih.gov/svn/psc/trunk/web/src/main/java/edu/northwestern/bioinformatics/studycalendar/restlets/PscAuthenticationHelper.java
 
  are the Restlet-specific parts.  
https://ncisvn.nci.nih.gov/svn/psc/trunk/authentication/cas-plugin/src/main/java/edu/northwestern/bioinformatics/studycalendar/security/plugin/cas/CasAuthenticationSystem.java
 
  is the plugin for CAS.

>
> CAS: http://www.jasig.org/cas
>
> Regards,
>
> Arjohn
>
> -- 
> Arjohn Kampman, Senior Software Engineer
> Aduna - Semantic Power
> www.aduna-software.com
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2415378

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


RE: REST talk in Chicago, Nov 12

2009-11-09 Thread Jerome Louvel
Hi guys,

It looks like Chicago is a RESTful city :)
Good luck for your talks!

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



-Message d'origine-
De : webp...@tigris.org [mailto:webp...@tigris.org] 
Envoyé : vendredi 6 novembre 2009 21:33
À : discuss@restlet.tigris.org
Objet : RE: REST talk in Chicago, Nov 12

Wow, great to know this is happening.  I'm in Chicago and wish I could make
it on the 12th, but I have a prior engagement that day.  Do you know if this
talk will be recorded?

Btw, I'm also giving a talk on REST in Chicago on December 3 at Google's
offices on Kedzie.  http://chigtug5.eventbrite.com/

My name is curiously absent from the schedule, but I'm pretty sure I haven't
been bumped off.  :)

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

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


Re: watch http request

2009-11-09 Thread Rhett Sutphin
Hi Michael,

This is a discuss topic, so I'm moving it there.

On Nov 7, 2009, at 9:24 AM, Michael Strupp wrote:

> Hello community
>
> I'm writing a java Rest Client with restlet, to call a .NET  
> Webservice.
>
> To debug my application, it would be nice to watch the http request my
> client sends to the server.
>
> What i need is a simple method witch shows me for example something  
> like
> that:
>
> GET /infotext.html HTTP/1.1
> Host: www.example.net
>
> or this:
>
> POST /wiki/Spezial:Search HTTP/1.1
> Host: de.wikipedia.org
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 24
>
> search=Katzen&go=Artikel
>
>
> Is there a way to do this?

One way would be to use Apache HTTP Client connector and use its  
(Apache HTTP Client's) wire logger:

http://hc.apache.org/httpclient-3.x/logging.html

Rhett

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


Re: Example with ObjectRepresentation and annotation

2009-11-09 Thread Thierry Boileau
Hello Xavier,

Thanks for your contribution. We will take a look at it and decide if it 
can take place either in the tutorial (see 
http://www.restlet.org/documentation/2.0/firstResource for example) or 
in the org.restlet.example project.

Best regards,
Thierry Boileau
> Hello again,
> You can find attached the same example as before expanded with a @put 
> annotation (bi-directional communication).
> regards
> Xavier
>
> 2009/11/7 Xavier M.  >
>
> You can find attached the example completed and running ; this one
> retrieve a customer object from the server and made in the same
> time an authentification.
> It uses the annotation @get and the ClientResource and
> ServerResource classes.
> best regards
> Xavier
> ps : could be maybe put in the examplesin the src delivery directory?
>
> 2009/11/7 Xavier M.  >
>
> Hello,
> I've tried to write a full simple example with
> ObjectRepresentation and annotation...which doesn't run up to now.
> I'm in Restlet 2.0 M5.
>
> Any clue to solve the pb?
>
> regards
> Xavier
>
> ps : you can complete it too, with POST, PUT and so on... if
> you want ;)
>
>
>
>

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