use of org.cloudfoundry.identity.uaa.scim.validate.PasswordValidator in project uaa by cloudfoundry.
the class UaaChangePasswordServiceTest method setUp.
@Before
public void setUp() {
SecurityContextHolder.clearContext();
SecurityContextHolder.getContext().setAuthentication(new MockAuthentication());
scimUserProvisioning = mock(ScimUserProvisioning.class);
passwordValidator = mock(PasswordValidator.class);
subject = new UaaChangePasswordService(scimUserProvisioning, passwordValidator);
}
use of org.cloudfoundry.identity.uaa.scim.validate.PasswordValidator in project uaa by cloudfoundry.
the class UaaResetPasswordServiceTests method setUp.
@BeforeEach
void setUp() {
SecurityContextHolder.clearContext();
scimUserProvisioning = mock(ScimUserProvisioning.class);
codeStore = mock(ExpiringCodeStore.class);
passwordValidator = mock(PasswordValidator.class);
clientDetailsService = mock(MultitenantClientServices.class);
RandomValueStringGenerator randomValueStringGenerator = new RandomValueStringGenerator();
currentZoneId = "currentZoneId-" + randomValueStringGenerator.generate();
IdentityZoneManager mockIdentityZoneManager = mock(IdentityZoneManager.class);
when(mockIdentityZoneManager.getCurrentIdentityZoneId()).thenReturn(currentZoneId);
ResourcePropertySource resourcePropertySource = mock(ResourcePropertySource.class);
uaaResetPasswordService = new UaaResetPasswordService(scimUserProvisioning, codeStore, passwordValidator, clientDetailsService, resourcePropertySource, mockIdentityZoneManager);
}
Aggregations