From bf0271104e16ae44aac6d6393f98bc9f60e5ca4d Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Fri, 26 Apr 2013 18:20:28 +0200 Subject: Add Fedora login provider --- hyperkitty/lib/fedora.py | 29 +++++++++++++++++++++++++++++ hyperkitty/static/css/hyperkitty-user.css | 2 +- hyperkitty/static/img/login/fedora.png | Bin 0 -> 2613 bytes hyperkitty/templates/login.html | 2 ++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 hyperkitty/lib/fedora.py create mode 100644 hyperkitty/static/img/login/fedora.png (limited to 'hyperkitty') 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 new file mode 100644 index 0000000..f3ff345 Binary files /dev/null and b/hyperkitty/static/img/login/fedora.png differ 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 @@
  • Yahoo
  • +
  • Fedora
  • +
  • OpenID
    {% csrf_token %} -- cgit