title: What is the difference between authentication and authorization in context of Spring Security?
body: <p>I'm working on a java spring boot project which I'm trying to get spring security set up for user authentication with JWT, the tutorial I'm following(and also many tutorials and projects I found on the internet) talks about two sections- <strong>authentication and authorization</strong>. </p>
  
  <p>In most tutorials there are two filter classes one handles Authentication, and the other handles Authorization! 
  (Some I have found with only one class which extends <em><code>OncePerRequestFilter</code></em> class).</p>
  
  <p>In those projects that have two filter classes, 
  The Authentication filter class extends <em><code>UsernamePasswordAuthenticationFilter</code></em> class.
  Authorization class extends <em><code>BasicAuthenticationFilter</code></em> class.</p>
  
  <p>Is there a way that I can only use authentication part in my project or should I use both classes to set up user authentication in spring security?</p>
  
  <p>Any explanation will be appreciated.</p>