Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openSUSE OpenID login #51

Merged
merged 1 commit into from
Oct 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/backends/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Social backends
shopify
skyrock
soundcloud
suse
thisismyjam
stackoverflow
steam
Expand Down
13 changes: 13 additions & 0 deletions docs/backends/suse.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SUSE
====

This section describes how to setup the different services provided by SUSE and openSUSE.


openSUSE OpenId
---------------

openSUSE OpenId works straightforward, not settings are needed. Domains or emails
whitelists can be applied too, check the whitelists_ settings for details.

.. _whitelists: ../configuration/settings.html#whitelists
18 changes: 18 additions & 0 deletions social/backends/suse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
OpenSUSE OpenID support

OpenID also works straightforward, it doesn't need further configurations.
"""
from social.backends.open_id import OpenIdAuth


class OpenSUSEOpenId(OpenIdAuth):
name = 'opensuse'
URL = 'https://www.opensuse.org/openid/user/'

def get_user_id(self, details, response):
"""
Return user unique id provided by service. For openSUSE
the nickname is original.
"""
return details['nickname']