[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] UserRealm -> LoginService, jetty6 -> jetty7
|
Gustav,
Here's an example from the jetty-7 distro etc/jetty.xml file:
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
I just discovered the doco on the Eclipse wiki is wrong on this, so
I'm fixing it now.
cheers
Jan
Gustav Olsson wrote:
Hi all,
After upgrading from jetty6 to jetty7 I'm having some difficulties getting the DIGEST authentication I used in jetty6 to work in jetty7. The method Server.setUserRealms(UserRealm[]) is gone and I simply cannot find out how to bind my LoginService to the WebAppContext or server.
The web.xml is attached. Previously, all i hade to do was create an instance of a JDBCUserRealm and add it with the Server.setUserRealms(new UserRealm[]{<jdbcur>) to get it to kick in. With that method gone and all howtos covering jetty6 I cannot find out how to bind the JDBCUserRealm to the server/webapp. This is driving me nuts and all help is appreciated!
<web-app>
<servlet>
<servlet-name>name</servlet-name>
<servlet-class>SecureServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>name</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>ResourceName</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>TheRealm</realm-name>
</login-config>
<security-role>
<role-name>role</role-name>
</security-role>
</web-app>
Thanks in advance!
//Gustav
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users
--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com