title: Spring boot auth2 dependencies >> differences between spring-boot-starter-oauth2-client and spring-boot-starter-oauth2-resource-server
body: <p>What is the difference between the following 2 dependencies and when to use which?</p>
  <pre><code>  #maven pom.xml format deps:
  
     &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-oauth2-client&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-oauth2-resource-server&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>From what I researched you should use:</p>
  <p><strong>resource-server:</strong> When a client app is already verified via the authorization server. The client then sends the token in an authorization header to our spring boot server. The token then gets verified on the server and access is granted to server resources.</p>
  <p><strong>client</strong>: The spring boot app is the client now and will make a request to an authorization server from which it gets a token. This token can now be used in additional request to other resource servers to obtain certain resources.</p>
  <p>Is my understanding correct. Am I missing any details?</p>