-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
41 lines (31 loc) · 2.26 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'secret-key'
BLOB_ACCOUNT = os.environ.get('BLOB_ACCOUNT') or 'cmsadi'
BLOB_STORAGE_KEY = os.environ.get('BLOB_STORAGE_KEY') or 'TT9EKjfC946kxPjPCHkFjDTcbJN7b1liBv2tapTJpEg0AW5U8GP1f/wZ9QDHVoe2THBAP/jyC3zoF6uYXN2kB5Q=='
BLOB_CONTAINER = os.environ.get('BLOB_CONTAINER') or 'images'
SQL_SERVER = os.environ.get('SQL_SERVER') or 'cms-adi.database.windows.net'
SQL_DATABASE = os.environ.get('SQL_DATABASE') or 'cms-adi'
SQL_USER_NAME = os.environ.get('SQL_USER_NAME') or 'aditya'
SQL_PASSWORD = os.environ.get('SQL_PASSWORD') or 'P@ssword'
# Below URI may need some adjustments for driver version, based on your OS, if running locally
SQLALCHEMY_DATABASE_URI = 'mssql+pyodbc://' + SQL_USER_NAME + '@' + SQL_SERVER + ':' + SQL_PASSWORD + '@' + SQL_SERVER + ':1433/' + SQL_DATABASE + '?driver=ODBC+Driver+17+for+SQL+Server'
SQLALCHEMY_TRACK_MODIFICATIONS = False
### Info for MS Authentication ###
### As adapted from: https://github.com/Azure-Samples/ms-identity-python-webapp ###
CLIENT_SECRET = "qAc7Q~eHqd2vfRb_i.wBmw7kMK5WmdMqGhWq~"
# In your production app, Microsoft recommends you to use other ways to store your secret,
# such as KeyVault, or environment variable as described in Flask's documentation here:
# https://flask.palletsprojects.com/en/1.1.x/config/#configuring-from-environment-variables
# CLIENT_SECRET = os.getenv("CLIENT_SECRET")
# if not CLIENT_SECRET:
# raise ValueError("Need to define CLIENT_SECRET environment variable")
AUTHORITY = "https://login.microsoftonline.com/common" # For multi-tenant app, else put tenant name
# AUTHORITY = "https://login.microsoftonline.com/Enter_the_Tenant_Name_Here"
CLIENT_ID = "99ad042f-0d96-4f09-a84b-bee713ce4ddd"
REDIRECT_PATH = "/getAToken" # Used to form an absolute URL; must match to app's redirect_uri set in AAD
# You can find the proper permission names from this document
# https://docs.microsoft.com/en-us/graph/permissions-reference
SCOPE = ["User.Read"] # Only need to read user profile for this app
SESSION_TYPE = "filesystem" # Token cache will be stored in server-side session