# Path: project/settings/envvars.py
# def get_envvar_string(string):
#     s = os.getenv(string)
#     if s == None:
#         raise ImproperlyConfigured('Missing ENVVAR %s' % string)
#     return s


import datetime
from .envvars import get_envvar_string
from __future__ import absolute_import, print_function, unicode_literals




REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
    ),
}

JWT_AUTH = {
    'JWT_ENCODE_HANDLER':
    'rest_framework_jwt.utils.jwt_encode_handler',

    'JWT_DECODE_HANDLER':
    'rest_framework_jwt.utils.jwt_decode_handler',

    'JWT_PAYLOAD_HANDLER':
    'rest_framework_jwt.utils.jwt_payload_handler',

    'JWT_PAYLOAD_GET_USER_ID_HANDLER':
    'rest_framework_jwt.utils.jwt_get_user_id_from_payload_handler',

    'JWT_RESPONSE_PAYLOAD_HANDLER':
    'project.payload_handler.jwt_response_payload_handler',


# Path: project/settings/envvars.py
# def get_envvar_string(string):
#     s = os.getenv(string)
#     if s == None:
#         raise ImproperlyConfigured('Missing ENVVAR %s' % string)
#     return s


# Path: project/settings/rest_settings.py
import datetime
from .envvars import get_envvar_string

from __future__ import absolute_import, print_function, unicode_literals




REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
    ),
}

JWT_AUTH = {
    'JWT_ENCODE_HANDLER':
    'rest_framework_jwt.utils.jwt_encode_handler',

    'JWT_DECODE_HANDLER':
    'rest_framework_jwt.utils.jwt_decode_handler',

    'JWT_PAYLOAD_HANDLER':
    'rest_framework_jwt.utils.jwt_payload_handler',

    'JWT_PAYLOAD_GET_USER_ID_HANDLER':
    'rest_framework_jwt.utils.jwt_get_user_id_from_payload_handler',

    'JWT_RESPONSE_PAYLOAD_HANDLER':
    'project.payload_handler.jwt_response_payload_handler',


    'JWT_SECRET_KEY': get_envvar_string('SECRET_KEY'),