-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from sparcs-kaist/develop
2021/03/06 v1.1.9 update
- Loading branch information
Showing
12 changed files
with
120 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous"> | ||
|
||
<title>Oops!</title> | ||
<style> | ||
html { | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body class="h-100"> | ||
<div class="d-flex justify-content-center h-100"> | ||
<div class="align-self-center"> | ||
<div class="text-center mb-4"> | ||
<img src="https://i.pinimg.com/originals/d3/a7/38/d3a738413b1b9c65333276c89ed82476.gif" /> | ||
</div> | ||
<div class="alert alert-secondary" role="alert"> | ||
<h4 class="alert-heading">Oops!</h4> | ||
<p> | ||
<strong>Ara에 로그인 하는 중에 문제가 발생했습니다.</strong> | ||
<br> | ||
아래와 같은 원인에 의해 문제가 발생했을 수 있습니다. | ||
</p> | ||
|
||
<ul> | ||
<li>SPARCS SSO 에 facebook 계정으로 로그인 하였음. | ||
<ul> | ||
<li><strong>SPARCS SSO 에서 로그아웃 하신 후에 facebook 대신 KAIST IAM (통합인증)으로 로그인해보세요.</strong></li> | ||
</ul> | ||
</li> | ||
<li> | ||
로그인 과정이 지연되어서 토큰이 만료됨. | ||
<ul> | ||
<li><strong>SPARCS SSO 에서 로그아웃 하신 후에 다시 로그인해보세요.</strong></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
<p> | ||
문제가 반복될 경우 [email protected] 에 아래의 에러 정보를 포함해 문의 부탁드립니다. | ||
<br> | ||
<code>code: {{ code }}, status_code: {{ status_code }}</code> | ||
</p> | ||
<hr> | ||
<p class="mb-0"> | ||
<a href="https://sparcssso.kaist.ac.kr/" class="btn btn-link px-0"> | ||
SPARCS SSO 으로 이동 | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from django.urls import path, include | ||
|
||
from apps.core.views import HomeView, StatusView, router | ||
from apps.core.views import HomeView, InvalidSsoLoginView, StatusView, router | ||
|
||
urlpatterns = [ | ||
path('api/', include(router.urls)), | ||
path('api/home/', view=HomeView.as_view(), name='HomeView'), | ||
path('api/status/', view=StatusView.as_view(), name='StatusView'), | ||
|
||
path('api/invalid_sso_login/', InvalidSsoLoginView.as_view(), name='InvalidSsoLoginView'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .home import * | ||
from .status import * | ||
from .router import * | ||
from .invalid_sso_login import InvalidSsoLoginView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from django.views.generic import TemplateView | ||
|
||
|
||
class InvalidSsoLoginView(TemplateView): | ||
template_name = 'invalid_sso_login.html' | ||
|
||
def get_context_data(self, **kwargs): | ||
context = super().get_context_data(**kwargs) | ||
|
||
# TODO: code 와 status_code 에 따라 다른 해결 방법을 제시할 수 있으면 좋겠습니다. | ||
# INVALID_METHOD, INVALID_CODE, TOKEN_SERVICE_MISMATCH, | ||
# TOKEN_EXPIRED, INVALID_SERVICE, INALID_TIMESTAMP, INVALID_SIGN | ||
# 등의 code 가 있을 수 있습니다. | ||
# https://github.com/sparcs-kaist/sparcssso/blob/master/apps/api/views/v2.py | ||
context.update({ | ||
'code': self.request.GET.get('code', ''), | ||
'status_code': self.request.GET.get('status_code', ''), | ||
}) | ||
|
||
return context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ class UserProfileAdmin(MetaDataModelAdmin): | |
'uid', | ||
'sid', | ||
'nickname', | ||
'user', | ||
'user__id', | ||
) | ||
|
||
|
||
|
18 changes: 18 additions & 0 deletions
18
apps/user/migrations/0015_fix_inactive_due_at_verbose_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1 on 2021-02-25 12:23 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('user', '0014_userprofile_inactive_due_at'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='userprofile', | ||
name='inactive_due_at', | ||
field=models.DateTimeField(default=None, null=True, verbose_name='활동정지 마감 일시'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters