Settings¶
Settings in NewAuth works by subclassing BaseConfig with “DevConfig” or “ProdConfig” or any other prefix. The prefix will be read from NEWAUTH_ENV and default to “Dev”.
- class newauth.settings_dist.BaseConfig[source]¶
File based configuration object.
- SECRET_KEY¶
Secret key for securing cookies. Generate one with openssl rand –base64 64
- APP_DIR¶
Application absolute path
- PROJECT_ROOT¶
Project root
- DEBUG¶
Turn on debug mode by environment
- SQLALCHEMY_DATABASE_URI¶
Default SQLAlchemy database
- SQLALCHEMY_ECHO¶
Turn on debug mode for SQLAlchemy (prints out queries)
- EVE¶
Eve related settings, see Eve Settings.
- ADMIN_GROUP¶
The admin group
- PING_GROUP¶
The ping group
- PINGERS¶
Array of pings to load and use
- PINGERS_SETTINGS¶
Runtime configuration for pingers
- PLUGINS¶
Plugins list
Mail Settings¶
#: Mail settings for https://pythonhosted.org/flask-mail/
MAIL_SERVER = 'localhost'
MAIL_PORT = 25
MAIL_USE_TLS = False
MAIL_USE_SSL = False
MAIL_DEBUG = os.getenv('DEBUG', False)
MAIL_USERNAME = None
MAIL_PASSWORD = None
MAIL_DEFAULT_SENDER = None
Celery Settings¶
#: Celery Settings, more available http://celery.readthedocs.org/en/latest/configuration.html
CELERY_BROKER_URL = 'redis://localhost:6379'
CELERY_RESULT_BACKEND = 'db+sqlite:///celery.sqlite'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
Eve Settings¶
The Eve settings configure your NewAuth instance with your corporation/alliance identity and needs. For NewAuth to work, it needs one or several corporation api keys that will allow it to query its contacts to compute a list of allowable characters. See Update Contacts for more informations. Here’s an example for the I Whip My Slaves Back and Forth alliance:
EVE = {
'auth_name': 'J4LP',
'requirements': {
# Members need a mask of 65544538 and a key that does not expires
# Allies need a mask of 50331656 and a key that can expires
'internal': {'mask': 65544538, 'expires': False},
'ally': {'mask': 50331656, 'expires': True}
},
'alliances': [99002172], # This is J4LP's alliance id
'corporations': [],
'keys': [(0, 'sekret')]
}
The alliances and corporations lists are a list of entity ID to add by default when updating the contacts. Here’s an example