Skip to content

Commit

Permalink
Rename some vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ckleinschmidt committed Feb 19, 2022
1 parent 99cff53 commit 8230c76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion easy_auth/options.py → easy_auth/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OPTIONS = {
DEFAULTS = {
'LOGIN_TEMPLATE': 'admin/login.html',
'REDIRECT_AUTH_USERS': False,
'USERID_HEADER': 'x-ms-client-principal-name',
Expand Down
4 changes: 2 additions & 2 deletions easy_auth/helpers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from django.conf import settings
import logging

from .options import OPTIONS
from .constants import DEFAULTS

logger = logging.getLogger(__name__)


def get_option(key):
return getattr(settings, key, OPTIONS.get(key))
return getattr(settings, key, DEFAULTS.get(key))

def get_aad_user_id(headers):
user_id = headers.get(get_option('USERID_HEADER'))
Expand Down

0 comments on commit 8230c76

Please sign in to comment.