Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nerdsforever/django-multi-oauth
Django shell project of using OAuth with multiple services
https://github.com/nerdsforever/django-multi-oauth
Last synced: 11 days ago
JSON representation
Django shell project of using OAuth with multiple services
- Host: GitHub
- URL: https://github.com/nerdsforever/django-multi-oauth
- Owner: nerdsforever
- License: other
- Created: 2010-01-14T19:14:10.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2010-04-01T01:29:33.000Z (over 14 years ago)
- Last Synced: 2024-08-02T14:12:28.608Z (4 months ago)
- Language: Python
- Homepage:
- Size: 101 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
django-multi-oauth
===========================------------
A simple django application that will handle authentication to multiple oauth applications.
------------
example settings.py
------------from oauth.utils import *
OAUTH_SETTINGS = {
'TWITTER': {
OAUTH_SERVER : 'twitter.com',
OAUTH_REQUEST_TOKEN_URL : 'https://twitter.com/oauth/request_token', #
OAUTH_ACCESS_TOKEN_URL : 'https://twitter.com/oauth/access_token',
OAUTH_AUTHORIZATION_URL : 'https://twitter.com/oauth/authorize',
OAUTH_CONSUMER_KEY : '',
OAUTH_CONSUMER_SECRET : '',
OAUTH_TOKEN_NAME : 'oauth_token',
OAUTH_UNAUTHORIZED_REQUEST_TOKEN_KEY: 'twitter_unauthorized_token',
OAUTH_ACCESS_TOKEN_KEY : 'twitter_access_token', # Name of session key used to store access token
OAUTH_BASE_TEMPLATE : 'oauth/twitter/main.html', # Base template when /oauth/twitter/ is retrieved
OAUTH_CALLBACK_REDIRECT_URL_NAME: '', # Named url of where to redirect to after oauth
OAUTH_AUTH_REDIRECT_URL_NAME: 'oauth_main', # Named url of where to redirect to if already auth
},
'FRIENDFEED': {
OAUTH_SERVER : 'friendfeed.com',
OAUTH_REQUEST_TOKEN_URL : 'https://friendfeed.com/account/oauth/request_token',
OAUTH_ACCESS_TOKEN_URL : 'https://friendfeed.com/account/oauth/access_token',
OAUTH_AUTHORIZATION_URL : 'https://friendfeed.com/account/oauth/authorize',
OAUTH_CONSUMER_KEY : '',
OAUTH_CONSUMER_SECRET : '',
OAUTH_TOKEN_NAME : 'oauth_token',
OAUTH_UNAUTHORIZED_REQUEST_TOKEN_KEY: 'ff_unauthorized_token',
OAUTH_ACCESS_TOKEN_KEY : 'ff_access_token',
OAUTH_BASE_TEMPLATE : 'oauth/friendfeed/main.html',
OAUTH_CALLBACK_REDIRECT_URL_NAME: '',
OAUTH_AUTH_REDIRECT_URL_NAME: 'oauth_main',
}
'EXAMPLEAPP': {
OAUTH_SERVER : 'exampleapp.com',
OAUTH_REQUEST_TOKEN_URL : 'https://exampleapp.com/oauth/request_token',
OAUTH_ACCESS_TOKEN_URL : 'https://exampleapp.com/oauth/access_token',
OAUTH_AUTHORIZATION_URL : 'https://exampleapp.com/oauth/authorize',
OAUTH_CONSUMER_KEY : '',
OAUTH_CONSUMER_SECRET : '',
OAUTH_TOKEN_NAME : 'oauth_token',
OAUTH_UNAUTHORIZED_REQUEST_TOKEN_KEY: 'unauthorized_token',
OAUTH_ACCESS_TOKEN_KEY : 'access_token',
OAUTH_BASE_TEMPLATE : 'oauth/exampleapp/main.html',
OAUTH_CALLBACK_REDIRECT_URL_NAME: '',
OAUTH_AUTH_REDIRECT_URL_NAME: 'oauth_main',
}
}