Search code examples
javaspring-bootspring-securityspring-security-oauth2

Spring Boot OAuth2 Security properties names in .properties files?


I'm currently learning and experimenting with the different Spring Boot Security OAuth2 packages and I'm really confused with the actual configuration properties names. I found on the internet and on multiple Spring Documentation pages different naming schemes for these properties. For example I found

security.oauth2.resource.token-info-uri=xxx
security.oauth2.client.resource.tokenInfoUri
spring.security.oauth2.resource.token-info-uri=xxx
spring.security.oauth2.resourceserver ...
...

I'm trying to make sense of all this and would like to know what are the differences with all of them. Are they version related, package related, are they typos, are some names deprecated, ... ?

Regards

P.S. I'm currently using Spring Boot 2.2.4


Solution

  • Spring Security OAuth & Spring Security

    The Spring Security OAuth project is deprecated. The latest OAuth 2.0 support is provided by Spring Security

    The property entries starting with

    security.oauth2.*
    

    are part of the deprecated Spring Security OAuth ( example ) and the properties starting with

     spring.security.oauth2.*
    

    are part of the Spring Security ( The official documentation of current spring boot Security Properties )

    Additional References