I have a working app with restlet 2.0 and Server resources configured through
SpringBeanRouter


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:util="http://www.springframework.org/schema/util";
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>

    <bean name="component" id="component"
class="org.restlet.ext.spring.SpringComponent">
        <property name="clientsList">
            <list>
               <value>HTTP</value>
               <value>HTTPS</value>
            </list>
         </property>
        <property name="hosts">
            <list>
                <ref bean="virtualHost" />
            </list>
        </property>        
    </bean>

    <bean id="virtualHost" class="org.restlet.ext.spring.SpringHost">
        <constructor-arg ref="component" />
        <property name="attachments">
            <map>
                <entry key="/ws" value-ref="router" />    
            </map>
        </property>
    </bean>

   <bean name="router" class="org.restlet.ext.spring.SpringBeanRouter"/>
</beans>


Sample Restlet Server Resource:

@Component( "/data/Contact/{userId}" )
@Scope( value = "prototype" )
public class ContactData
        extends BaseServerResource {


}


I'd like to add a default ChallengeAuthenticator
(ChallengeScheme.HTTP_BASIC) and I understand how to do this
programmatically if I were using straight Restlet (without spring) but not
sure how to setup a filter to a SpringBeanRouter

Two references I've seen so far doesn't discuss these details:
http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet/112-restlet.html
http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/70-restlet/196-restlet.html

Any help, appreciated
-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/How-to-signup-a-ChallengeAuthenticator-when-using-SpringBeanRouter-tp5588475p5588475.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to