forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for regional STS (Azure#19392)
- Loading branch information
1 parent
44b1ef9
commit d120b15
Showing
13 changed files
with
176 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# ------------------------------------ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# ------------------------------------ | ||
# pylint:skip-file (avoids crash due to six.with_metaclass https://github.com/PyCQA/astroid/issues/713) | ||
from enum import Enum | ||
from six import with_metaclass | ||
|
||
from azure.core import CaseInsensitiveEnumMeta | ||
from msal import ConfidentialClientApplication | ||
|
||
|
||
class RegionalAuthority(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): | ||
"""Identifies a regional authority for authentication""" | ||
|
||
#: Attempt to discover the appropriate authority. This works on some Azure hosts, such as VMs and | ||
#: Azure Functions. The non-regional authority is used when discovery fails. | ||
AUTO_DISCOVER_REGION = ConfidentialClientApplication.ATTEMPT_REGION_DISCOVERY | ||
|
||
ASIA_EAST = "eastasia" | ||
ASIA_SOUTHEAST = "southeastasia" | ||
AUSTRALIA_CENTRAL = "australiacentral" | ||
AUSTRALIA_CENTRAL_2 = "australiacentral2" | ||
AUSTRALIA_EAST = "australiaeast" | ||
AUSTRALIA_SOUTHEAST = "australiasoutheast" | ||
BRAZIL_SOUTH = "brazilsouth" | ||
CANADA_CENTRAL = "canadacentral" | ||
CANADA_EAST = "canadaeast" | ||
CHINA_EAST = "chinaeast" | ||
CHINA_EAST_2 = "chinaeast2" | ||
CHINA_NORTH = "chinanorth" | ||
CHINA_NORTH_2 = "chinanorth2" | ||
EUROPE_NORTH = "northeurope" | ||
EUROPE_WEST = "westeurope" | ||
FRANCE_CENTRAL = "francecentral" | ||
FRANCE_SOUTH = "francesouth" | ||
GERMANY_CENTRAL = "germanycentral" | ||
GERMANY_NORTH = "germanynorth" | ||
GERMANY_NORTHEAST = "germanynortheast" | ||
GERMANY_WEST_CENTRAL = "germanywestcentral" | ||
GOVERNMENT_US_ARIZONA = "usgovarizona" | ||
GOVERNMENT_US_DOD_CENTRAL = "usdodcentral" | ||
GOVERNMENT_US_DOD_EAST = "usdodeast" | ||
GOVERNMENT_US_IOWA = "usgoviowa" | ||
GOVERNMENT_US_TEXAS = "usgovtexas" | ||
GOVERNMENT_US_VIRGINIA = "usgovvirginia" | ||
INDIA_CENTRAL = "centralindia" | ||
INDIA_SOUTH = "southindia" | ||
INDIA_WEST = "westindia" | ||
JAPAN_EAST = "japaneast" | ||
JAPAN_WEST = "japanwest" | ||
KOREA_CENTRAL = "koreacentral" | ||
KOREA_SOUTH = "koreasouth" | ||
NORWAY_EAST = "norwayeast" | ||
NORWAY_WEST = "norwaywest" | ||
SOUTH_AFRICA_NORTH = "southafricanorth" | ||
SOUTH_AFRICA_WEST = "southafricawest" | ||
SWITZERLAND_NORTH = "switzerlandnorth" | ||
SWITZERLAND_WEST = "switzerlandwest" | ||
UAE_CENTRAL = "uaecentral" | ||
UAE_NORTH = "uaenorth" | ||
UK_SOUTH = "uksouth" | ||
UK_WEST = "ukwest" | ||
US_CENTRAL = "centralus" | ||
US_EAST = "eastus" | ||
US_EAST_2 = "eastus2" | ||
US_NORTH_CENTRAL = "northcentralus" | ||
US_SOUTH_CENTRAL = "southcentralus" | ||
US_WEST = "westus" | ||
US_WEST_2 = "westus2" | ||
US_WEST_CENTRAL = "westcentralus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters