|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2021 the original author or authors.
|
|
|
|
|
* Copyright 2012-2022 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -46,6 +46,7 @@ import org.springframework.security.oauth2.client.registration.ClientRegistratio
|
|
|
|
|
import org.springframework.security.oauth2.jwt.JwtDecoder;
|
|
|
|
|
import org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector;
|
|
|
|
|
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
|
|
|
|
|
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository;
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
import static org.mockito.Mockito.mock;
|
|
|
|
@ -156,6 +157,14 @@ class UserDetailsServiceAutoConfigurationTests {
|
|
|
|
|
.run(((context) -> assertThat(context).doesNotHaveBean(InMemoryUserDetailsManager.class)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void userDetailsServiceWhenRelyingPartyRegistrationRepositoryBeanPresent() {
|
|
|
|
|
this.contextRunner
|
|
|
|
|
.withBean(RelyingPartyRegistrationRepository.class,
|
|
|
|
|
() -> mock(RelyingPartyRegistrationRepository.class))
|
|
|
|
|
.run(((context) -> assertThat(context).doesNotHaveBean(InMemoryUserDetailsManager.class)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void generatedPasswordShouldNotBePrintedIfAuthenticationManagerBuilderIsUsed(CapturedOutput output) {
|
|
|
|
|
this.contextRunner.withUserConfiguration(TestConfigWithAuthenticationManagerBuilder.class)
|
|
|
|
|