class AzureCredentialConnector implements CredentialConnector {

    @Override
    public CredentialPrerequisitesResponse getPrerequisites(CloudContext cloudContext, String externalId, String deploymentAddress, CredentialType type) {
        String creationCommand = appCreationCommand.generate(deploymentAddress);
        String encodedCommand = Base64.encodeBase64String(creationCommand.getBytes());
        String roleDefJson;
        switch (type) {
            case ENVIRONMENT:
                roleDefJson = azurePlatformParameters.getRoleDefJson();
                break;
            case AUDIT:
                roleDefJson = azurePlatformParameters.getAuditRoleDefJson();
                break;
            default:
                roleDefJson = null;
                break;
        }
        AzureCredentialPrerequisites azurePrerequisites = new AzureCredentialPrerequisites(encodedCommand, roleDefJson);
        return new CredentialPrerequisitesResponse(cloudContext.getPlatform().value(), azurePrerequisites);
    }

}