use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.authentication.StackAuthenticationV4Request in project cloudbreak by hortonworks.
the class StackAuthenticationToStackAuthenticationV4RequestConverter method convert.
public StackAuthenticationV4Request convert(StackAuthentication source) {
StackAuthenticationV4Request stackAuthenticationRequest = new StackAuthenticationV4Request();
stackAuthenticationRequest.setLoginUserName(null);
stackAuthenticationRequest.setPublicKey(source.getPublicKey());
stackAuthenticationRequest.setPublicKeyId(source.getPublicKeyId());
return stackAuthenticationRequest;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.authentication.StackAuthenticationV4Request in project cloudbreak by hortonworks.
the class FreeIpaTestDto method withAuthentication.
private FreeIpaTestDto withAuthentication(StackAuthenticationTestDto stackAuthentication) {
StackAuthenticationV4Request request = stackAuthentication.getRequest();
StackAuthenticationRequest authReq = new StackAuthenticationRequest();
authReq.setLoginUserName(request.getLoginUserName());
authReq.setPublicKey(request.getPublicKey());
authReq.setPublicKeyId(request.getPublicKeyId());
getRequest().setAuthentication(authReq);
return this;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.authentication.StackAuthenticationV4Request in project cloudbreak by hortonworks.
the class DistroXAuthenticationToStaAuthenticationConverterTest method testConvertEnvironmentAuthenticationResponseToStackAuthenticationV4Request.
@Test
void testConvertEnvironmentAuthenticationResponseToStackAuthenticationV4Request() {
EnvironmentAuthenticationResponse input = new EnvironmentAuthenticationResponse();
input.setPublicKey("somePublicKey");
input.setPublicKeyId("somePublicKeyId");
input.setLoginUserName("someLoginUserName");
StackAuthenticationV4Request result = underTest.convert(input);
assertNotNull(result);
assertNull(result.getLoginUserName());
assertEquals(input.getPublicKey(), result.getPublicKey());
assertEquals(input.getPublicKeyId(), result.getPublicKeyId());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.authentication.StackAuthenticationV4Request in project cloudbreak by hortonworks.
the class DistroXAuthenticationToStaAuthenticationConverter method convert.
public StackAuthenticationV4Request convert(EnvironmentAuthenticationResponse source) {
StackAuthenticationV4Request response = new StackAuthenticationV4Request();
// response.setLoginUserName(source.getLoginUserName());
response.setPublicKey(source.getPublicKey());
response.setPublicKeyId(source.getPublicKeyId());
return response;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.authentication.StackAuthenticationV4Request in project cloudbreak by hortonworks.
the class StackRequestManifester method setupAuthentication.
private void setupAuthentication(DetailedEnvironmentResponse environment, StackV4Request stackRequest) {
if (stackRequest.getAuthentication() == null) {
StackAuthenticationV4Request stackAuthenticationV4Request = new StackAuthenticationV4Request();
stackAuthenticationV4Request.setPublicKey(environment.getAuthentication().getPublicKey());
stackAuthenticationV4Request.setPublicKeyId(environment.getAuthentication().getPublicKeyId());
stackRequest.setAuthentication(stackAuthenticationV4Request);
}
}
Aggregations