Skip to content

Commit 3642ca2

Browse files
committed
Merge pull request 'Fix #23212: authentication:none broken' (#10) from feature/23212 into develop
2 parents c90dd49 + f8e9d6d commit 3642ca2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/security/WebSecurityConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,15 @@ protected void configure(HttpSecurity http) throws Exception {
143143
http.addFilter(new BasicAuthenticationFilter(authenticationManagerBean()));
144144
}
145145

146-
// The `anyRequest` method may only be called once.
147-
// Therefore we call it here, make our changes to it and forward it to the various authentication backends
148-
ExpressionUrlAuthorizationConfigurer<HttpSecurity>.AuthorizedUrl anyRequestConfigurer = http.authorizeRequests().anyRequest();
149146

150147
if (auth.hasAuthorization()) {
148+
// The `anyRequest` method may only be called once.
149+
// Therefore we call it here, make our changes to it and forward it to the various authentication backends
150+
ExpressionUrlAuthorizationConfigurer<HttpSecurity>.AuthorizedUrl anyRequestConfigurer = http.authorizeRequests().anyRequest();
151151
anyRequestConfigurer.fullyAuthenticated();
152+
auth.configureHttpSecurity(http, anyRequestConfigurer);
152153
}
153154

154-
auth.configureHttpSecurity(http, anyRequestConfigurer);
155155

156156
}
157157

0 commit comments

Comments
 (0)