0
votes

I want to create a simple program based upon oauth2 authentication including Auth server, resource server and client. I found there are various of dependencies used by online tutorials. I am confused why spring provides so many dependencies for oauth2. What is difference between below dependencies and when to use them. And which oauth2 dependency comes with springboot.

The First line is group-id and next line is artifact-id

  1. org.springframework.security

    spring-security-oauth2-client

  2. org.springframework.security

    spring-security-oauth2-jose

  3. org.springframework.security

    spring-security-oauth2-core

  4. org.springframework.security

    spring-security-oauth2-resource-server

  5. org.springframework.security.oauth

    spring-security-oauth2

  6. org.springframework.security.oauth.boot

    spring-security-oauth2-autoconfigure

  7. org.springframework.cloud

    spring-cloud-starter-oauth2

1

1 Answers

1
votes

If you want to create a simple program based upon oauth2, then you can use the dependency from the point 7 and spring-cloud-starter will pick up the dependency itself under your version of Spring & Spring Cloud :)

The last point (7) contains all of the above. But if you don't need all dependencies from the 7, then import it into the project separately (1-6).