Search in sources :

Example 1 with AzureCredentialAttributes

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);
}
Also used : AzureCredentialAttributes(com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes) CredentialAttributes(com.sequenceiq.environment.credential.attributes.CredentialAttributes) AzureCredentialAttributes(com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes)

Example 2 with AzureCredentialAttributes

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;
}
Also used : AzureCredentialAttributes(com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes)

Aggregations

AzureCredentialAttributes (com.sequenceiq.environment.credential.attributes.azure.AzureCredentialAttributes)2 CredentialAttributes (com.sequenceiq.environment.credential.attributes.CredentialAttributes)1