EVE Swagger Interface

Closes #591

Conflicts:
	authentication/views.py
	eveonline/views.py
	stock/templates/public/characternotexisting.html
This commit is contained in:
Adarnof
2016-12-29 17:53:33 -05:00
39 changed files with 1357 additions and 1295 deletions

View File

@@ -19,5 +19,5 @@ def states(request):
def sso(request):
return {
'EVE_SSO_CALLBACK_URL': settings.EVE_SSO_CALLBACK_URL,
'EVE_SSO_CALLBACK_URL': settings.ESI_SSO_CALLBACK_URL,
}

View File

@@ -10,7 +10,7 @@ from authentication.models import AuthServicesInfo
from authentication.forms import LoginForm, RegistrationForm
from django.contrib.auth.models import User
from django.contrib import messages
from eve_sso.decorators import token_required
from esi.decorators import token_required
import logging
logger = logging.getLogger(__name__)
@@ -95,13 +95,14 @@ def help_view(request):
@token_required(new=True)
def sso_login(request, tokens=[]):
token = tokens[0]
def sso_login(request, token):
try:
char = EveCharacter.objects.get(character_id=token.character_id)
if char.user:
if char.user.is_active:
login(request, char.user)
token.user = char.user
token.save()
return redirect('auth_dashboard')
else:
messages.error(request, 'Your account has been disabled.')