Skip to content

Add public constants for cloud endpoints #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/main/java/com/microsoft/aad/msal4j/AzureCloudEndpoint.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.microsoft.aad.msal4j;

/**
* All the national clouds authenticate users separately in each environment and have separate authentication endpoints.
* AzureCloudEndpoint is an utility enum containing URLs for each of the national clouds endpoints, as well as the public cloud endpoint
*
* For more details see: https://aka.ms/msal4j-national-cloud
*/
public enum AzureCloudEndpoint {
/**
* Microsoft Azure public cloud, https://login.microsoftonline.com
*/
AzurePublic("https://login.microsoftonline.com/"),
/**
* Microsoft Chinese national cloud, https://login.chinacloudapi.cn
*/
AzureChina("https://login.chinacloudapi.cn/"),
/**
* Microsoft German national cloud ("Black Forest"), https://login.microsoftonline.de
*/
AzureGermany("https://login.microsoftonline.de/"),
/**
* US Government cloud, https://login.microsoftonline.us
*/
AzureUsGovernment("https://login.microsoftonline.us/");

public final String endpoint;

AzureCloudEndpoint(String endpoint) {
this.endpoint = endpoint;
}
}