title: Spring security only for authorization. External authentication
body: <p>As title says, i'm developing a web application that receives user authentication infos from an external application. A spring controller of my app gets user info and stores it in session. I want to authenticate this user inside Spring Security and then use his roles to grant/deny access to urls like</p>
  
  <pre><code>&lt;intercept-url pattern="/myprotectedpage*" access="hasRole('rightrole')" /&gt;
  </code></pre>
  
  <p>I read some tutorials speaking about PRE_AUTH_FILTER and UserDetailsService but i can't get the point. What is the application lifecycle of Spring Security? Which classes are involved?
  I need some full working samples.</p>