-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from jathanism/fix-auth_header
Fixes #80 - Associate auth_header setting w/ auth_header method.
- Loading branch information
Showing
9 changed files
with
184 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
Constant values used across the project. | ||
""" | ||
|
||
from __future__ import unicode_literals | ||
import os | ||
|
||
|
||
__author__ = 'Jathan McCollum' | ||
__maintainer__ = 'Jathan McCollum' | ||
__email__ = 'jathan@dropbox.com' | ||
__copyright__ = 'Copyright (c) 2016 Dropbox, Inc.' | ||
|
||
|
||
# Header used for passthrough authentication. | ||
AUTH_HEADER = 'X-NSoT-Email' | ||
|
||
# Default authentication method | ||
DEFAULT_AUTH_METHOD = 'auth_token' | ||
|
||
# Mapping of required field names and default values we want to be in the | ||
# dotfile. | ||
REQUIRED_FIELDS = { | ||
'auth_method': ['auth_token', 'auth_header'], | ||
'url': None, | ||
} | ||
|
||
# Fields that map to specific auth_methods. | ||
SPECIFIC_FIELDS = { | ||
'auth_header': { | ||
'default_domain': 'localhost', | ||
'auth_header': AUTH_HEADER, | ||
} | ||
} | ||
|
||
# Mapping of optional field names and default values (if any) | ||
OPTIONAL_FIELDS = { | ||
'default_site': None, | ||
'api_version': None, | ||
} | ||
|
||
# Path stuff | ||
USER_HOME = os.path.expanduser('~') | ||
DOTFILE_NAME = '.pynsotrc' | ||
DOTFILE_PATH = os.path.join(USER_HOME, DOTFILE_NAME) | ||
DOTFILE_PERMS = 0600 # -rw------- | ||
|
||
# Config section name | ||
SECTION_NAME = 'pynsot' |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.19' | ||
__version__ = '0.19.1' |
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
Oops, something went wrong.