use of com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes in project cloudbreak by hortonworks.
the class CredentialServiceTest method getTestAttributesWithCodeGrantFlow.
private String getTestAttributesWithCodeGrantFlow(CodeGrantFlowAttributes codeGrantFlowAttributes) {
CredentialAttributes credentialAttributes = new CredentialAttributes();
AzureCredentialAttributes azureAttributes = new AzureCredentialAttributes();
azureAttributes.setCodeGrantFlowBased(codeGrantFlowAttributes);
credentialAttributes.setAzure(azureAttributes);
return getAttributesAsString(credentialAttributes);
}
use of com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes in project cloudbreak by hortonworks.
the class AzureCredentialV1ParametersToAzureCredentialAttributesConverter method convert.
public AzureCredentialAttributes convert(AzureCredentialRequestParameters source) {
AzureCredentialAttributes response = new AzureCredentialAttributes();
doIfNotNull(source.getAppBased(), param -> response.setAppBased(getAppBased(param)));
doIfNotNull(source.getRoleBased(), param -> response.setCodeGrantFlowBased(getRoleBased(param)));
response.setSubscriptionId(source.getSubscriptionId());
response.setTenantId(source.getTenantId());
return response;
}
Aggregations