Skip to content

Commit

Permalink
Fix checkstyle issues Azure#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Vecchio (Southworks SRL) committed Sep 29, 2017
1 parent 71dcddc commit c2e4410
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,65 @@
import java.net.URISyntaxException;

public class AzureEnvironmentConstants {

// Utility classes should not have a public or default constructor.
private AzureEnvironmentConstants() {
}

/**
* The Active Directory endpoint for Azure Cloud environment.
*/
public static final URI AzureCloudActiveDirectoryEndpoint = makeURI("https://login.microsoftonline.com/");
public static final URI AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.com/");

/**
* The Media Services resource for Azure Cloud environment.
*/
public static final String AzureCloudMediaServicesResource = "https://rest.media.azure.net";
public static final String AZURE_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.azure.net";

/**
* The Active Directory endpoint for Azure China Cloud environment.
*/
public static final URI AzureChinaCloudActiveDirectoryEndpoint = makeURI("https://login.chinacloudapi.cn/");
public static final URI AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.chinacloudapi.cn/");

/**
* The Media Services resource for Azure China Cloud environment.
*/
public static final String AzureChinaCloudMediaServicesResource = "https://rest.media.chinacloudapi.cn";
public static final String AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.chinacloudapi.cn";

/**
* The Active Directory endpoint for Azure US Government environment.
*/
public static final URI AzureUsGovernmentActiveDirectoryEndpoint = makeURI("https://login-us.microsoftonline.com/");
public static final URI AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login-us.microsoftonline.com/");

/**
* The Media Services resource for Azure US Government environment.
*/
public static final String AzureUsGovernmentMediaServicesResource = "https://rest.media.usgovcloudapi.net";
public static final String AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE = "https://rest.media.usgovcloudapi.net";

/**
* The native SDK AAD application ID for Azure US Government environment.
*/
public static final String AzureUsGovernmentSdkAadAppliationId = "68dac91e-cab5-461b-ab4a-ec7dcff0bd67";
public static final String AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID = "68dac91e-cab5-461b-ab4a-ec7dcff0bd67";

/**
* The Active Directory endpoint for Azure German cloud environment.
*/
public static final URI AzureGermanCloudActiveDirectoryEndpoint = makeURI("https://login.microsoftonline.de/");
public static final URI AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.de/");

/**
* The Media Services resource for Azure German Cloud environment.
*/
public static final String AzureGermanCloudMediaServicesResource = "https://rest.media.cloudapi.de";
public static final String AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.cloudapi.de";

/**
* The native SDK AAD application ID for Azure Cloud, Azure China Cloud and Azure German Cloud environment.
*/
public static final String SdkAadApplicationId = "d476653d-842c-4f52-862d-397463ada5e7";
public static final String SDK_AAD_APPLICATION_ID = "d476653d-842c-4f52-862d-397463ada5e7";

/**
* The native SDK AAD application's redirect URL for all environments.
*/
public static final URI SdkAadApplicationRedirectUri = makeURI("https://AzureMediaServicesNativeSDK");
public static final URI SDK_AAD_APPLICATION_REDIRECT_URI = makeURI("https://AzureMediaServicesNativeSDK");

private static URI makeURI(String urlString) {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
package com.microsoft.windowsazure.services.media.authentication;

public class AzureEnvironments {


// Utility classes should not have a public or default constructor.
private AzureEnvironments() {
}

/**
* Azure Cloud environment.
*/
public static final AzureEnvironment AzureCloudEnvironment = new AzureEnvironment(
AzureEnvironmentConstants.AzureCloudActiveDirectoryEndpoint,
AzureEnvironmentConstants.AzureCloudMediaServicesResource,
AzureEnvironmentConstants.SdkAadApplicationId,
AzureEnvironmentConstants.SdkAadApplicationRedirectUri);
AzureEnvironmentConstants.AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT,
AzureEnvironmentConstants.AZURE_CLOUD_MEDIA_SERVICES_RESOURCE,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI);

/**
* Azure China Cloud environment.
*/
public static final AzureEnvironment AzureChinaCloudEnvironment = new AzureEnvironment(
AzureEnvironmentConstants.AzureChinaCloudActiveDirectoryEndpoint,
AzureEnvironmentConstants.AzureChinaCloudMediaServicesResource,
AzureEnvironmentConstants.SdkAadApplicationId,
AzureEnvironmentConstants.SdkAadApplicationRedirectUri);
AzureEnvironmentConstants.AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT,
AzureEnvironmentConstants.AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI);

/**
* Azure US Government environment.
*/
public static final AzureEnvironment AzureUsGovernmentEnvironment = new AzureEnvironment(
AzureEnvironmentConstants.AzureUsGovernmentActiveDirectoryEndpoint,
AzureEnvironmentConstants.AzureUsGovernmentMediaServicesResource,
AzureEnvironmentConstants.AzureUsGovernmentSdkAadAppliationId,
AzureEnvironmentConstants.SdkAadApplicationRedirectUri);
AzureEnvironmentConstants.AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT,
AzureEnvironmentConstants.AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE,
AzureEnvironmentConstants.AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI);

/**
* Azure German Cloud environment.
*/
public static final AzureEnvironment AzureGermanCloudEnvironment = new AzureEnvironment(
AzureEnvironmentConstants.AzureGermanCloudActiveDirectoryEndpoint,
AzureEnvironmentConstants.AzureGermanCloudMediaServicesResource,
AzureEnvironmentConstants.SdkAadApplicationId,
AzureEnvironmentConstants.SdkAadApplicationRedirectUri);
AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT,
AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID,
AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI);
}

0 comments on commit c2e4410

Please sign in to comment.