Skip to content

Commit

Permalink
Merge branch '6.2.x'
Browse files Browse the repository at this point in the history
Closes gh-15065
  • Loading branch information
marcusdacoregio committed May 13, 2024
2 parents e932387 + 963cdc7 commit 76ca0ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/modules/ROOT/pages/reactive/authorization/method.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Java::
[source,java,role="primary"]
----
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
static GrantedAuthorityDefaults grantedAuthorityDefaults() {
return new GrantedAuthorityDefaults("MYPREFIX_");
}
Expand All @@ -113,7 +114,8 @@ static GrantedAuthorityDefaults grantedAuthorityDefaults() {

[TIP]
====
We expose `GrantedAuthorityDefaults` using a `static` method to ensure that Spring publishes it before it initializes Spring Security's method security `@Configuration` classes
We expose `GrantedAuthorityDefaults` using a `static` method to ensure that Spring publishes it before it initializes Spring Security's method security `@Configuration` classes.
Since the `GrantedAuthorityDefaults` bean is part of internal workings of Spring Security, we should also expose it as an infrastructural bean effectively avoiding some warnings related to bean post-processing (see https://github.com/spring-projects/spring-security/issues/14751[gh-14751]).
====

[[jc-reactive-method-security-custom-authorization-manager]]
Expand Down

0 comments on commit 76ca0ee

Please sign in to comment.