浏览代码

Corrected sample code for request-header authentication.

Luke Taylor 16 年之前
父节点
当前提交
fdf46b99eb
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      docs/manual/src/docbook/preauth.xml

+ 8 - 3
docs/manual/src/docbook/preauth.xml

@@ -137,16 +137,19 @@
       <section>
       <section>
         <title>Siteminder Example Configuration</title>
         <title>Siteminder Example Configuration</title>
         <para> A typical configuration using this filter would look like this: <programlisting><![CDATA[
         <para> A typical configuration using this filter would look like this: <programlisting><![CDATA[
+  <security:http>
+    <!-- Additional http configuration omitted -->
+    <security:custom-filter ref="siteminderFilter" />
+  </security:http>
+  
 	<bean id="siteminderFilter" class=
 	<bean id="siteminderFilter" class=
 "org.springframework.security.web.authentication.preauth.header.RequestHeaderAuthenticationFilter">
 "org.springframework.security.web.authentication.preauth.header.RequestHeaderAuthenticationFilter">
-    <security:custom-filter position="PRE_AUTH_FILTER" />
     <property name="principalRequestHeader" value="SM_USER"/>
     <property name="principalRequestHeader" value="SM_USER"/>
     <property name="authenticationManager" ref="authenticationManager" />
     <property name="authenticationManager" ref="authenticationManager" />
   </bean>
   </bean>
 
 
   <bean id="preauthAuthProvider"
   <bean id="preauthAuthProvider"
 class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
 class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
-    <security:custom-authentication-provider />      
     <property name="preAuthenticatedUserDetailsService">
     <property name="preAuthenticatedUserDetailsService">
       <bean id="userDetailsServiceWrapper" 
       <bean id="userDetailsServiceWrapper" 
           class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
           class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
@@ -155,7 +158,9 @@ class="org.springframework.security.web.authentication.preauth.PreAuthenticatedA
     </property>
     </property>
 	</bean>
 	</bean>
 	
 	
-	<security:authentication-manager alias="authenticationManager" />
+	<security:authentication-manager alias="authenticationManager">
+	  <security:authentication-provider ref="preauthAuthProvider" />
+	</security-authentication-manager>
 ]]>  
 ]]>  
 </programlisting> We've assumed here that the security namespace is being used for
 </programlisting> We've assumed here that the security namespace is being used for
           configuration (hence the user of the <literal>custom-filter</literal>,
           configuration (hence the user of the <literal>custom-filter</literal>,