mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 16:46:20 +01:00
Discord OAuth Integration (#468)
* Implement Discord OAuth - extend group caching to Discord - use bot token to manipulate api - migrate to official API Addresses #419 * Remove virtualenv wrapper * Discord OAuth integration playtest corrections Closes #419
This commit is contained in:
@@ -437,13 +437,19 @@ TEAMSPEAK3_PUBLIC_URL = os.environ.get('AA_TEAMSPEAK3_PUBLIC_URL', 'yourdomain.c
|
||||
######################################
|
||||
# Discord Configuration
|
||||
######################################
|
||||
# DISCORD_SERVER_ID - ID of the server to manage
|
||||
# DISCORD_USER_EMAIL - email of the server management user
|
||||
# DISCORD_USER_PASSWORD - password of the server management user
|
||||
# DISCORD_GUILD_ID - ID of the guild to manage
|
||||
# DISCORD_BOT_TOKEN - oauth token of the app bot user
|
||||
# DISCORD_INVITE_CODE - invite code to the server
|
||||
# DISCORD_APP_ID - oauth app client ID
|
||||
# DISCORD_APP_SECRET - oauth app secret
|
||||
# DISCORD_CALLBACK_URL - oauth callback url
|
||||
######################################
|
||||
DISCORD_SERVER_ID = os.environ.get('AA_DISCORD_SERVER_ID', '')
|
||||
DISCORD_USER_EMAIL = os.environ.get('AA_DISCORD_USER_EMAIL', '')
|
||||
DISCORD_USER_PASSWORD = os.environ.get('AA_DISCORD_USER_PASSWORD', '')
|
||||
DISCORD_GUILD_ID = os.environ.get('AA_DISCORD_GUILD_ID', '')
|
||||
DISCORD_BOT_TOKEN = os.environ.get('AA_DISCORD_BOT_TOKEN', '')
|
||||
DISCORD_INVITE_CODE = os.environ.get('AA_DISCORD_INVITE_CODE', '')
|
||||
DISCORD_APP_ID = os.environ.get('AA_DISCORD_APP_ID', '')
|
||||
DISCORD_APP_SECRET = os.environ.get('AA_DISCORD_APP_SECRET', '')
|
||||
DISCORD_CALLBACK_URL = os.environ.get('AA_DISCORD_CALLBACK_URL', 'http://mydomain.com/discord_callback')
|
||||
|
||||
######################################
|
||||
# Discourse Configuration
|
||||
|
||||
@@ -145,6 +145,8 @@ urlpatterns = patterns('',
|
||||
url(r'^activate_discord/$', 'services.views.activate_discord', name='auth_activate_discord'),
|
||||
url(r'^deactivate_discord/$', 'services.views.deactivate_discord', name='auth_deactivate_discord'),
|
||||
url(r'^reset_discord/$', 'services.views.reset_discord', name='auth_reset_discord'),
|
||||
url(r'^discord_callback/$', 'services.views.discord_callback', name='auth_discord_callback'),
|
||||
url(r'^discord_add_bot/$', 'services.views.discord_add_bot', name='auth_discord_add_bot'),
|
||||
|
||||
# Discourse Service Control
|
||||
url(r'^activate_discourse/$', 'services.views.activate_discourse', name='auth_activate_discourse'),
|
||||
|
||||
@@ -13,4 +13,9 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "alliance_auth.settings")
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
# virtualenv wrapper
|
||||
#activate_env=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'env/bin/activate_this.py')
|
||||
#execfile(activate_env, dict(__file__=activate_env))
|
||||
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
||||
Reference in New Issue
Block a user