1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

Merge pull request #1110 from haiwen/5.0-zimlet_shib

[shib] Add shibboleth SSO success page for seafile zimlet
This commit is contained in:
Daniel Pan
2016-04-09 15:37:46 +08:00
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<!-- This file is used to communicate with seafile zimlet on SSO login. -->
<!-- Please copy this file to <seafile-root>/seahub-data/custom/templates/shibboleth/success.html, create new path if missing. -->
<!-- For security issue, please replace "*" in `parent.postMessage(msg, "*");` with your zimbra service origin, e.g. "https://zimbra-service.com" -->
<html>
<head>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jq.min.js?t=1398068110"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/base.js?t=1404370380"></script>
</head>
<body>
Login success
</body>
<script>
var msg = getCookie('seahub_auth');
if (msg) {
parent.postMessage(msg, "*");
}
</script>
</html>

View File

@@ -318,6 +318,7 @@ if getattr(settings, 'MULTI_TENANCY', False):
if getattr(settings, 'ENABLE_SHIB_LOGIN', False): if getattr(settings, 'ENABLE_SHIB_LOGIN', False):
urlpatterns += patterns('', urlpatterns += patterns('',
url(r'^shib-login/', shib_login, name="shib_login"), url(r'^shib-login/', shib_login, name="shib_login"),
url(r'^shib-success/', TemplateView.as_view(template_name="shibboleth/success.html"), name="shib_success"),
) )
if getattr(settings, 'ENABLE_KRB5_LOGIN', False): if getattr(settings, 'ENABLE_KRB5_LOGIN', False):