servicemix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kévin Sailly <kevin.sai...@gmail.com>
Subject Re: troubles configuring http basic authentication on camel-jetty
Date Fri, 15 Jul 2011 15:35:41 GMT
Hello,

I have found out the solution using this beans and configuring them
correctly :
 
 <bean id="loginService"
class="org.eclipse.jetty.security.HashLoginService"> 

        <property name="name" value="royaume" /> 

        <property name="config" value="./etc/realm.properties" /> 

  </bean> 



  <bean id="konstraint" class="org.eclipse.jetty.http.security.Constraint"> 

        <property name="name" value="BASIC" /> 

        <property name="authenticate" value="true" /> 

        <property name="roles" value="myrole" /> 

  </bean> 

  

   <bean id="mappin" class="org.eclipse.jetty.security.ConstraintMapping"> 

        <property name="pathSpec" value="/*" /> 

        <property name="constraint" ref="konstraint" /> 

  </bean> 



  <bean id="sekurityHandler"
class="org.eclipse.jetty.security.ConstraintSecurityHandler"> 

        <property name="constraintMappings"> 

                <list> 

                        <ref bean="mappin"/> 

                </list> 

        </property>

        <property name="authenticator"> 

                <bean
class="org.eclipse.jetty.security.authentication.BasicAuthenticator" /> 

        </property> 

        <property name="loginService" ref="loginService" /> 

  </bean>

 
  
and using the appropriate realm.properties file with users,password, roles:
myuser:mypassword, myrole
...

Thanks,
Kévin


--
View this message in context: http://servicemix.396122.n5.nabble.com/troubles-configuring-http-basic-authentication-on-camel-jetty-tp2851353p4591119.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Mime
View raw message