diff options
-rw-r--r-- | hyperkitty/lib/fedora.py | 29 | ||||
-rw-r--r-- | hyperkitty/static/css/hyperkitty-user.css | 2 | ||||
-rw-r--r-- | hyperkitty/static/img/login/fedora.png | bin | 0 -> 2613 bytes | |||
-rw-r--r-- | hyperkitty/templates/login.html | 2 |
4 files changed, 32 insertions, 1 deletions
diff --git a/hyperkitty/lib/fedora.py b/hyperkitty/lib/fedora.py new file mode 100644 index 0000000..e87459d --- /dev/null +++ b/hyperkitty/lib/fedora.py @@ -0,0 +1,29 @@ +""" +Fedora OpenID support + +No extra configurations are needed to make this work. +""" +from social_auth.backends import OpenIDBackend, OpenIdAuth + + +FEDORA_OPENID_URL = 'http://id.fedoraproject.org' + + +class FedoraBackend(OpenIDBackend): + """Fedora OpenID authentication backend""" + name = 'fedora' + + +class FedoraAuth(OpenIdAuth): + """Fedora OpenID authentication""" + AUTH_BACKEND = FedoraBackend + + def openid_url(self): + """Return Fedora OpenID service url""" + return FEDORA_OPENID_URL + + +# Backend definition +BACKENDS = { + 'fedora': FedoraAuth, +} diff --git a/hyperkitty/static/css/hyperkitty-user.css b/hyperkitty/static/css/hyperkitty-user.css index 254d82e..49edfa6 100644 --- a/hyperkitty/static/css/hyperkitty-user.css +++ b/hyperkitty/static/css/hyperkitty-user.css @@ -5,7 +5,7 @@ #login, #register { text-align: left; - width: 40em; + width: 60em; margin: 0 auto; } #login h2, diff --git a/hyperkitty/static/img/login/fedora.png b/hyperkitty/static/img/login/fedora.png Binary files differnew file mode 100644 index 0000000..f3ff345 --- /dev/null +++ b/hyperkitty/static/img/login/fedora.png diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html index 3c3377e..4a27031 100644 --- a/hyperkitty/templates/login.html +++ b/hyperkitty/templates/login.html @@ -27,6 +27,8 @@ <li><a title="Yahoo" class="socialaccount_provider yahoo" href="{% url 'socialauth_begin' backend='yahoo' %}?next={{ next }}"><img src="{{ STATIC_URL }}img/login/yahoo.png" alt="Yahoo" /></a></li> + <li><a title="Fedora" class="socialaccount_provider fedora" href="{% url 'socialauth_begin' backend='fedora' %}?next={{ next }}"><img src="{{ STATIC_URL }}img/login/fedora.png" alt="Fedora" /></a></li> + <li><a class="socialaccount_provider openid" href="#"><img src="{{ STATIC_URL }}img/login/openid.png" alt="OpenID" /></a> <form method="post" action="{% url 'socialauth_begin' "openid" %}?next={{ next }}" class="form-inline openid"> {% csrf_token %} |