Search in sources :

Example 1 with UaaResetPasswordService

use of org.cloudfoundry.identity.uaa.account.UaaResetPasswordService 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);
}
Also used : MultitenantClientServices(org.cloudfoundry.identity.uaa.zone.MultitenantClientServices) ResourcePropertySource(org.springframework.core.io.support.ResourcePropertySource) UaaResetPasswordService(org.cloudfoundry.identity.uaa.account.UaaResetPasswordService) PasswordValidator(org.cloudfoundry.identity.uaa.scim.validate.PasswordValidator) ExpiringCodeStore(org.cloudfoundry.identity.uaa.codestore.ExpiringCodeStore) RandomValueStringGenerator(org.springframework.security.oauth2.common.util.RandomValueStringGenerator) ScimUserProvisioning(org.cloudfoundry.identity.uaa.scim.ScimUserProvisioning) IdentityZoneManager(org.cloudfoundry.identity.uaa.zone.beans.IdentityZoneManager) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

UaaResetPasswordService (org.cloudfoundry.identity.uaa.account.UaaResetPasswordService)1 ExpiringCodeStore (org.cloudfoundry.identity.uaa.codestore.ExpiringCodeStore)1 ScimUserProvisioning (org.cloudfoundry.identity.uaa.scim.ScimUserProvisioning)1 PasswordValidator (org.cloudfoundry.identity.uaa.scim.validate.PasswordValidator)1 MultitenantClientServices (org.cloudfoundry.identity.uaa.zone.MultitenantClientServices)1 IdentityZoneManager (org.cloudfoundry.identity.uaa.zone.beans.IdentityZoneManager)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 ResourcePropertySource (org.springframework.core.io.support.ResourcePropertySource)1 RandomValueStringGenerator (org.springframework.security.oauth2.common.util.RandomValueStringGenerator)1