File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
vaadin-spring/src/main/java/com/vaadin/flow/spring Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public VaadinRolePrefixHolder vaadinRolePrefixHolder(
198
198
.map (GrantedAuthorityDefaults ::getRolePrefix ).orElse (null ));
199
199
}
200
200
201
- @ Bean ( name = "VaadinAuthenticationContext" )
201
+ @ Bean
202
202
@ ConditionalOnMissingBean
203
203
AuthenticationContext authenticationContext () {
204
204
return new AuthenticationContext ();
Original file line number Diff line number Diff line change 16
16
package com .vaadin .flow .spring .security ;
17
17
18
18
import javax .crypto .SecretKey ;
19
-
20
19
import java .io .IOException ;
21
20
import java .util .ArrayList ;
22
21
import java .util .LinkedHashMap ;
@@ -124,10 +123,6 @@ public abstract class VaadinWebSecurity {
124
123
@ Autowired
125
124
private ObjectProvider <NavigationAccessControl > accessControlProvider ;
126
125
127
- // initialized only for tests, it gets overridden by the injected instance
128
- @ Autowired
129
- private AuthenticationContext authenticationContext = new AuthenticationContext ();
130
-
131
126
private NavigationAccessControl accessControl ;
132
127
133
128
@ PostConstruct
@@ -136,6 +131,8 @@ void afterPropertiesSet() {
136
131
authenticationContext .setRolePrefixHolder (vaadinRolePrefixHolder );
137
132
}
138
133
134
+ private final AuthenticationContext authenticationContext = new AuthenticationContext ();
135
+
139
136
/**
140
137
* Registers default {@link SecurityFilterChain} bean.
141
138
* <p>
@@ -168,6 +165,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
168
165
*
169
166
* @return the authentication-context bean
170
167
*/
168
+ @ Bean (name = "VaadinAuthenticationContext" )
171
169
public AuthenticationContext getAuthenticationContext () {
172
170
return authenticationContext ;
173
171
}
You can’t perform that action at this time.
0 commit comments