Search in sources :

Example 6 with AuthorityOverrideFunction

use of com.github.nagyesta.lowkeyvault.http.AuthorityOverrideFunction in project lowkey-vault by nagyesta.

the class KeysStepDefs method theKeyClientIsCreatedWithVaultNameSelected.

@Given("a key client is created with the vault named {name}")
public void theKeyClientIsCreatedWithVaultNameSelected(final String vaultName) {
    final String vaultAuthority = vaultName + ".localhost:8443";
    final String vaultUrl = "https://" + vaultAuthority;
    final AuthorityOverrideFunction overrideFunction = new AuthorityOverrideFunction(vaultAuthority, CONTAINER_AUTHORITY);
    context.setProvider(new ApacheHttpClientProvider(vaultUrl, overrideFunction));
}
Also used : ApacheHttpClientProvider(com.github.nagyesta.lowkeyvault.http.ApacheHttpClientProvider) AuthorityOverrideFunction(com.github.nagyesta.lowkeyvault.http.AuthorityOverrideFunction) Given(io.cucumber.java.en.Given)

Aggregations

AuthorityOverrideFunction (com.github.nagyesta.lowkeyvault.http.AuthorityOverrideFunction)6 BasicAuthenticationCredential (com.azure.core.credential.BasicAuthenticationCredential)3 TokenCredential (com.azure.core.credential.TokenCredential)3 ApacheHttpClient (com.github.nagyesta.lowkeyvault.http.ApacheHttpClient)3 ApacheHttpClientProvider (com.github.nagyesta.lowkeyvault.http.ApacheHttpClientProvider)3 Given (io.cucumber.java.en.Given)3 Test (org.junit.jupiter.api.Test)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)2