@@ -161,7 +161,9 @@ SecurityFilterChain securityFilterChainLogin(HttpSecurity httpSecurity,
161
161
/* Make the application stateless */
162
162
.sessionManagement (httpSecuritySessionManagementConfigurer -> httpSecuritySessionManagementConfigurer
163
163
.sessionCreationPolicy (SessionCreationPolicy .STATELESS ));
164
-
164
+
165
+ LOG .info ("Configure login mode: classic={}, oauth2={}" , loginProperties .isClassicModeEnabled (), loginProperties .isOAuth2ModeEnabled ());
166
+
165
167
if (!loginProperties .isOAuth2ModeEnabled () && !loginProperties .isClassicModeEnabled ()) {
166
168
String exMsg = "At least one of 'classic' or 'oauth2' mode must be enabled by setting the '%s.%s' property" .formatted (
167
169
SecHubSecurityProperties .LoginProperties .PREFIX ,
@@ -233,6 +235,8 @@ private static void configureResourceServerMode(HttpSecurity httpSecurity,
233
235
LOG .warn ("No resource server configuration detected. All requests to protected paths will be rejected." );
234
236
return ;
235
237
}
238
+
239
+ LOG .info ("Configure resource server mode: classic={}, oauth2={}" , resourceServerProperties .isClassicModeEnabled (), resourceServerProperties .isOAuth2ModeEnabled ());
236
240
237
241
if (!resourceServerProperties .isClassicModeEnabled () && !resourceServerProperties .isOAuth2ModeEnabled ()) {
238
242
String exMsg = "At least one of 'classic' or 'oauth2' mode must be enabled by setting the '%s.%s' property" .formatted (
@@ -271,7 +275,9 @@ private static void configureResourceServerOAuth2Mode(HttpSecurity httpSecurity,
271
275
AES256Encryption aes256Encryption ,
272
276
JwtDecoder jwtDecoder ,
273
277
RestTemplate restTemplate ) throws Exception {
274
-
278
+
279
+ LOG .info ("Configure oAuth2 mode: jwt={}, opaqueToken={}" , oAuth2Properties .isJwtModeEnabled (), oAuth2Properties .isOpaqueTokenModeEnabled ());
280
+
275
281
if (oAuth2Properties .isJwtModeEnabled () == oAuth2Properties .isOpaqueTokenModeEnabled ()) {
276
282
String exMsg = "Either 'jwt' or opaque token mode must be enabled by setting the '%s.%s' property to either '%s' or '%s'" .formatted (
277
283
SecHubSecurityProperties .ResourceServerProperties .OAuth2Properties .PREFIX ,
@@ -298,7 +304,6 @@ private static void configureResourceServerOAuth2JwtMode(HttpSecurity httpSecuri
298
304
UserDetailsService userDetailsService ,
299
305
JwtDecoder jwtDecoder ,
300
306
AES256Encryption aes256Encryption ) throws Exception {
301
-
302
307
if (userDetailsService == null ) {
303
308
throw new NoSuchBeanDefinitionException (UserDetailsService .class );
304
309
}
0 commit comments