Skip to content
This repository was archived by the owner on Mar 7, 2020. It is now read-only.

Commit 882a250

Browse files
author
Doug Mahugh
committed
document AUTHORITY_URL options
1 parent f333fa5 commit 882a250

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

config.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1-
"""
2-
This file contains configuration settings for running the Python auth samples
3-
locally. In a production deployment, this information should be saved in a
4-
database or other secure storage mechanism.
1+
"""Configuration settings for running the Python auth samples locally.
2+
3+
In a production deployment, this information should be saved in a database or
4+
other secure storage mechanism.
55
"""
66

7-
CLIENT_ID = 'PUT YOUR CLIENT ID HERE'
8-
CLIENT_SECRET = 'PUT YOUR CLIENT SECRET HERE'
7+
CLIENT_ID = 'ENTER_YOUR_CLIENT_ID'
8+
CLIENT_SECRET = 'ENTER_YOUR_SECRET'
99
REDIRECT_URI = 'http://localhost:5000/login/authorized'
1010

11+
# AUTHORITY_URL ending determines type of account that can be authenticated:
12+
# /organizations = organizational accounts only
13+
# /consumers = MSAs only (Microsoft Accounts - Live.com, Hotmail.com, etc.)
14+
# /common = allow both types of accounts
1115
AUTHORITY_URL = 'https://login.microsoftonline.com/common'
16+
1217
AUTH_ENDPOINT = '/oauth2/v2.0/authorize'
1318
TOKEN_ENDPOINT = '/oauth2/v2.0/token'
1419

1520
RESOURCE = 'https://graph.microsoft.com/'
1621
API_VERSION = 'v1.0'
17-
SCOPES = ['User.Read'] # add other scopes/permissions as needed
22+
SCOPES = ['User.Read'] # Add other scopes/permissions as needed.
23+
1824

1925
# This code can be removed after configuring CLIENT_ID and CLIENT_SECRET above.
20-
if ' ' in CLIENT_ID or ' ' in CLIENT_SECRET:
26+
if 'ENTER_YOUR' in CLIENT_ID or 'ENTER_YOUR' in CLIENT_SECRET:
2127
print('ERROR: config.py does not contain valid CLIENT_ID and CLIENT_SECRET')
2228
import sys
2329
sys.exit(1)

0 commit comments

Comments
 (0)