<commit_before># -*- coding: utf-8 -*-
"""
Example configuration for GEAStarterKit
"""

##
## Authentication/authorizationc config
import authomatic

from authomatic.providers import oauth2
from collections import OrderedDict

AUTHOMATIC_CONFIG = OrderedDict([
    ('google', {
        'name': 'Google',

        'id': 1000,

        'icon': 'google'
    }),

    # ('github', {
    #     'name': 'Github',
    #
    #     'class_': oauth2.GitHub,
    #     'consumer_key': 'ADD YOURS',
    #     'consumer_secret': 'AD YOURS',
    #
    #     'id': 2000,
    #
    #     'icon': 'github',
    #
    #     'scope': ['user:email']
    # }),

])

import os
if os.environ.get('SERVER_SOFTWARE', '').startswith('Development') or os.environ.get('SERVER_SOFTWARE', '') == '':
    SECRET_STRING = 'YOUR SECRET KEY'
    DEVELOPMENT = True
else:
    SECRET_STRING = 'YOUR SECRET KEY'
    DEVELOPMENT = False

#
# Talisman security
import talisman

csp_policy = {
    # Fonts from fonts.google.com
    'font-src': "'self' themes.googleusercontent.com *.gstatic.com",
    # <iframe> based embedding for Maps and Youtube.
    'frame-src': "'self' www.google.com www.youtube.com",
    # Assorted Google-hosted Libraries/APIs.
    'script-src': "'self' ajax.googleapis.com *.googleanalytics.com "
                  "*.google-analytics.com",
    # Used by generated code from http://www.google.com/fonts
    'style-src': "'self' ajax.googleapis.com fonts.googleapis.com "
                 "*.gstatic.com",

    # gravatar
    'img-src': "'self' *.gravatar.com",

    # Other
    'default-src': "'self' *.gstatic.com",
}

enable_talisman = True
talisman_config = dict(
    force_https=True,
    force_https_permanent=False,
    frame_options=talisman.SAMEORIGIN,
    frame_options_allow_from=None,
    strict_transport_security=True,
    strict_transport_security_max_age=31556926,  # One year in seconds
    strict_transport_security_include_subdomains=True,
    content_security_policy=csp_policy,
    session_cookie_secure=True,
    session_cookie_http_only=True
)


#
# Origin address for system emails.
email_from_address = 'root@localhost'

#
# Options for login manager
max_days_verification = 30
max_hours_password_reset = 48

#
# How long to time.sleep() when an invalid login, token, or similar is tried.
security_wait = 3

#
# Languages application supports
languages = OrderedDict([<commit_msg>For now, disable talisman by defualt.<commit_after># -*- coding: utf-8 -*-
"""
Example configuration for GEAStarterKit
"""

##
## Authentication/authorizationc config
import authomatic

from authomatic.providers import oauth2
from collections import OrderedDict

AUTHOMATIC_CONFIG = OrderedDict([
    ('google', {
        'name': 'Google',

        'id': 1000,

        'icon': 'google'
    }),

    # ('github', {
    #     'name': 'Github',
    #
    #     'class_': oauth2.GitHub,
    #     'consumer_key': 'ADD YOURS',
    #     'consumer_secret': 'AD YOURS',
    #
    #     'id': 2000,
    #
    #     'icon': 'github',
    #
    #     'scope': ['user:email']
    # }),

])

import os
if os.environ.get('SERVER_SOFTWARE', '').startswith('Development') or os.environ.get('SERVER_SOFTWARE', '') == '':
    SECRET_STRING = 'YOUR SECRET KEY'
    DEVELOPMENT = True
else:
    SECRET_STRING = 'YOUR SECRET KEY'
    DEVELOPMENT = False

#
# Talisman security
import talisman

csp_policy = {
    # Fonts from fonts.google.com
    'font-src': "'self' themes.googleusercontent.com *.gstatic.com",
    # <iframe> based embedding for Maps and Youtube.
    'frame-src': "'self' www.google.com www.youtube.com",
    # Assorted Google-hosted Libraries/APIs.
    'script-src': "'self' ajax.googleapis.com *.googleanalytics.com "
                  "*.google-analytics.com",
    # Used by generated code from http://www.google.com/fonts
    'style-src': "'self' ajax.googleapis.com fonts.googleapis.com "
                 "*.gstatic.com",

    # gravatar
    'img-src': "'self' *.gravatar.com",

    # Other
    'default-src': "'self' *.gstatic.com",
}

enable_talisman = False
talisman_config = dict(
    force_https=True,
    force_https_permanent=False,
    frame_options=talisman.SAMEORIGIN,
    frame_options_allow_from=None,
    strict_transport_security=True,
    strict_transport_security_max_age=31556926,  # One year in seconds
    strict_transport_security_include_subdomains=True,
    content_security_policy=csp_policy,
    session_cookie_secure=True,
    session_cookie_http_only=True
)


#
# Origin address for system emails.
email_from_address = 'root@localhost'

#
# Options for login manager
max_days_verification = 30
max_hours_password_reset = 48

#
# How long to time.sleep() when an invalid login, token, or similar is tried.
security_wait = 3

#
# Languages application supports
languages = OrderedDict([
{'fraction_non_alphanumeric': 0.1315296566077003, 'fraction_numerical': 0.009989594172736732, 'mean_word_length': 3.279608192341941, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4845675', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1585, 'n_words': 340}