Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p>Implement a custom <code>AuthenticationProvider</code> which gets all your authentication information from the <code>Authentication</code>: <code>getCredentials()</code>, <code>getDetails()</code>, and <code>getPrincipal()</code>.</p> <p>Tie it into your Spring Security authentication mechanism using the following configuration snippet:</p></li> </ol> <pre class="lang-xml prettyprint-override"><code>&lt;bean id="myAuthenticationProvider" class="com.example.MyAuthenticationProvider"&gt; &lt;security:custom-authentication-provider /&gt; &lt;/bean&gt; </code></pre> <ol start="2"> <li><p>This step is optional, if you can find a suitable one from standard implementations. If not, implement a class extending the <code>Authentication</code> interface on which you can put your authentication parameters: </p> <pre><code>(e.g. a user identifier, timestamp, signature, etc.) </code></pre></li> <li><p>Extend a custom <code>SpringSecurityFilter</code> which ties the above two classes together. For example, the Filter might get the <code>AuthenticationManager</code> and call <code>authenticate()</code> using your implementation of <code>Authentication</code> as input.</p> <p>You can extend <a href="https://fisheye.springsource.org/browse/~tag=3.0.5.RELEASE/spring-security/web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java?r=6ac858814407cee65e3c30779cb271ecaf3abd19" rel="nofollow noreferrer">AbstractAuthenticationProcessingFilter</a> as a start.</p> <p>You can reference <a href="https://fisheye.springsource.org/browse/~tag=3.0.5.RELEASE/spring-security/web/src/main/java/org/springframework/security/web/authentication/UsernamePasswordAuthenticationFilter.java?hb=true" rel="nofollow noreferrer">UsernamePasswordAuthenticationFilter</a> which extends <code>AbstractAuthenticationProcessingFilter</code>. <code>UsernamePasswordAuthenticationFilter</code> implements the standard Username/Password Authentication.</p></li> <li><p>Configure your Spring Security to add or replace the standard <code>AUTHENTICATION_PROCESSING_FILTER</code>. For Spring Security Filter orders, see <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/reference/ns-config.html#filter-stack" rel="nofollow noreferrer">http://static.springsource.org/spring-security/site/docs/3.0.x/reference/ns-config.html#filter-stack</a></p> <p>Here is a configuration snippet for how to replace it with your implementation:</p></li> </ol> <pre class="lang-xml prettyprint-override"><code>&lt;beans:bean id="myFilter" class="com.example.MyAuthenticationFilter"&gt; &lt;custom-filter position="AUTHENTICATION_PROCESSING_FILTER"/&gt; &lt;/beans:bean&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload