Polish ReactiveUserDetailsServiceAutoConfigurationTests
	
		
			
	
		
	
	
		
			
				
	
				Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions
				
					Details
				
			
		
			
				
	
				Build and Deploy Snapshot / Verify (push) Blocked by required conditions
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:22], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:22], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run
				
					Details
				
			
		
	
				
					
				
			
				
	
				Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions
				
					Details
				
			
		
			
				
	
				Build and Deploy Snapshot / Verify (push) Blocked by required conditions
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:22], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:22], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:windows-latest name:Windows]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run
				
					Details
				
			
		
			
				
	
				Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run
				
					Details
				
			
		
	Closes gh-44934
This commit is contained in:
		
							parent
							
								
									d1345c4d9e
								
							
						
					
					
						commit
						aab929d029
					
				| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright 2012-2024 the original author or authors.
 | 
					 * Copyright 2012-2025 the original author or authors.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 * you may not use this file except in compliance with the License.
 | 
					 * you may not use this file except in compliance with the License.
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,6 @@ import org.springframework.security.core.userdetails.User;
 | 
				
			||||||
import org.springframework.security.core.userdetails.UserDetails;
 | 
					import org.springframework.security.core.userdetails.UserDetails;
 | 
				
			||||||
import org.springframework.security.crypto.password.PasswordEncoder;
 | 
					import org.springframework.security.crypto.password.PasswordEncoder;
 | 
				
			||||||
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
 | 
					import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
 | 
				
			||||||
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
 | 
					 | 
				
			||||||
import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector;
 | 
					import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.assertj.core.api.Assertions.assertThat;
 | 
					import static org.assertj.core.api.Assertions.assertThat;
 | 
				
			||||||
| 
						 | 
					@ -108,14 +107,6 @@ class ReactiveUserDetailsServiceAutoConfigurationTests {
 | 
				
			||||||
				.doesNotHaveBean(ReactiveUserDetailsService.class));
 | 
									.doesNotHaveBean(ReactiveUserDetailsService.class));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Test
 | 
					 | 
				
			||||||
	void doesNotConfigureDefaultUserIfResourceServerWithJWTIsUsed() {
 | 
					 | 
				
			||||||
		this.contextRunner.withUserConfiguration(JwtDecoderConfiguration.class).run((context) -> {
 | 
					 | 
				
			||||||
			assertThat(context).hasSingleBean(ReactiveJwtDecoder.class);
 | 
					 | 
				
			||||||
			assertThat(context).doesNotHaveBean(ReactiveUserDetailsService.class);
 | 
					 | 
				
			||||||
		});
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Test
 | 
						@Test
 | 
				
			||||||
	void doesNotConfigureDefaultUserIfResourceServerIsPresent() {
 | 
						void doesNotConfigureDefaultUserIfResourceServerIsPresent() {
 | 
				
			||||||
		this.contextRunner.run((context) -> assertThat(context).doesNotHaveBean(ReactiveUserDetailsService.class));
 | 
							this.contextRunner.run((context) -> assertThat(context).doesNotHaveBean(ReactiveUserDetailsService.class));
 | 
				
			||||||
| 
						 | 
					@ -232,24 +223,4 @@ class ReactiveUserDetailsServiceAutoConfigurationTests {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Configuration(proxyBeanMethods = false)
 | 
					 | 
				
			||||||
	static class JwtDecoderConfiguration {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		@Bean
 | 
					 | 
				
			||||||
		ReactiveJwtDecoder jwtDecoder() {
 | 
					 | 
				
			||||||
			return mock(ReactiveJwtDecoder.class);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Configuration(proxyBeanMethods = false)
 | 
					 | 
				
			||||||
	static class ReactiveOpaqueTokenIntrospectorConfiguration {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		@Bean
 | 
					 | 
				
			||||||
		ReactiveOpaqueTokenIntrospector introspectionClient() {
 | 
					 | 
				
			||||||
			return mock(ReactiveOpaqueTokenIntrospector.class);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue