我有码头8.1.10并希望获得它。这是来自jetty.xml:
<Call name="addBean">
<Arg>
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
<Set name="contexts">
<Ref id="Contexts" />
</Set>
<Call name="setContextAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/servlet-api-[^/]*\.jar$</Arg>
</Call>
</New>
</Arg>
</Call>
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm2</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/home/user/Desktop/solr-4.10.2/example/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
这是来自web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Solr authenticated application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>solr</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Test Realm2</realm-name>
</login-config>
这是我的realm.properties:
guest: guest, solr
当我想登录应用程序时,它会提示输入凭据。然而,即使我作为用户名和密码输入访客和访客,它也会无限地重新提示输入凭据。
有什么想法吗?