Search in sources :

Example 1 with BatchChangeSecretResponse

use of org.cloudfoundry.uaa.clients.BatchChangeSecretResponse in project cf-java-client by cloudfoundry.

the class ClientsTest method batchChangeSecret.

@Test
public void batchChangeSecret() {
    String clientId1 = this.nameFactory.getClientId();
    String clientId2 = this.nameFactory.getClientId();
    String clientSecret = this.nameFactory.getClientSecret();
    String newClientSecret1 = this.nameFactory.getClientSecret();
    String newClientSecret2 = this.nameFactory.getClientSecret();
    requestCreateClient(this.uaaClient, clientId1, clientSecret).then(requestCreateClient(this.uaaClient, clientId2, clientSecret)).then(this.uaaClient.clients().batchChangeSecret(BatchChangeSecretRequest.builder().changeSecret(ChangeSecret.builder().clientId(clientId1).oldSecret(clientSecret).secret(newClientSecret1).build(), ChangeSecret.builder().clientId(clientId2).oldSecret(clientSecret).secret(newClientSecret2).build()).build())).flatMapIterable(BatchChangeSecretResponse::getClients).as(StepVerifier::create).expectNextCount(2).expectComplete().verify(Duration.ofMinutes(5));
}
Also used : BatchChangeSecretResponse(org.cloudfoundry.uaa.clients.BatchChangeSecretResponse) AsciiString(io.netty.util.AsciiString) AbstractIntegrationTest(org.cloudfoundry.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

AsciiString (io.netty.util.AsciiString)1 AbstractIntegrationTest (org.cloudfoundry.AbstractIntegrationTest)1 BatchChangeSecretResponse (org.cloudfoundry.uaa.clients.BatchChangeSecretResponse)1 Test (org.junit.Test)1