spring-attic / spring-cloud-security

Security concerns for distributed applications implemented in Spring
Apache License 2.0
532 stars 244 forks source link

@AuthorizationServer And @Configuration #248

Closed hongji3354 closed 3 years ago

hongji3354 commented 3 years ago

@EnableWebSecurity has @Configuration, so just adding @EnableWebSecurity allows automatic setup, but @EnableAuthorizationServer does not have @Configuration, so you need to add @Configuration to proceed with the auto setup.

Generally, when using @Enable-related annotations, we think that using only that annotation will lead to automatic setup, so we would also like to add @Configuration to @EnableAuthorizationServer

spencergibb commented 3 years ago

how does this apply to this project?

hongji3354 commented 3 years ago

I wish there was @Configuration in the @EnableAuthorizationServer annotation, just as there is @Configuration in the @EnableWebSecurity annotation.

Use only the @EnableAuthorization Server annotation to proceed with the automatic setup.

spencergibb commented 3 years ago

@EnableAuthorizationServer is part of https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/config/annotation/web/configuration/EnableAuthorizationServer.java. Open an issue there as I can't transfer issues across orgs.

hongji3354 commented 3 years ago

Thank you.