Django Middleware for LinkedIn API
Project description
Django LinkedIn Middleware
Connect to the LinkedIn API.
Installation
$ pip install django-linkedin-middleware
Just add django-linkedin-middleware.middleware.LinkedinMiddleware
to your MIDDLEWARE
.
Usage
In the request session will be found 3 differents label :
linkedin_firstName
for the user first namelinkedin_lastName
for the user last namelinkedin_headline
for the user headline
In your HTML, you can directly add these label to display the data.
Settings
Linkedin Configuration
You need to create an application on the linkedin developer pages to https://www.linkedin.com/developer/apps to receive your credentials
LINKEDIN_APPLICATION_KEY
: the Client ID
LINKEDIN_APPLICATION_SECRET
: the Client Secret
LINKEDIN_APPLICATION_RETURN_CALLBACK
: the callback url (you should add the same url in the linkedin developer page)
LINKEDIN_APPLICATION_PROFILE
: a table of different application permissions. Here's a list of the permissions :
['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share']
. You could also add the permission
Application Configuration
PAGES_WITH_LINKEDIN_AUTH_REQUIRED
: the list of all pages on which you should force an authentication. By default, it will be all the pages (example : ['*']
)
PAGES_WITHOUT_LINKEDIN_AUTH_REQUIRED
: the list of all pages on which the authentication is disable.
Thanks
I only made a middleware for simply connect to linkedin and display information in the session. I based my work on the python-linkedin project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_linkedin_middleware-0.1.2.tar.gz
.
File metadata
- Download URL: django_linkedin_middleware-0.1.2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.3 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce87f7d4132eb9ff11dd450b723d55482e3de71cfd28c70e0d083ae4b2136c63 |
|
MD5 | c48125027d31ac412144e7eda4d9af17 |
|
BLAKE2b-256 | fdfe39c177383aeafb88e6f34efa38e76a3c6d489da3b1f2caf5b57acedd58aa |
File details
Details for the file django_linkedin_middleware-0.1.2-py2-none-any.whl
.
File metadata
- Download URL: django_linkedin_middleware-0.1.2-py2-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.3 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77989d228fc83880b86021323054718acb36677bf4de7ef9e1d2774b44a7120b |
|
MD5 | fbb67e5698893b6cc97341c892422e0f |
|
BLAKE2b-256 | 8f3b5a0f902b0d400d3ce9f89f1206e0af6cdef78ce4650188f8d3331e2d40d2 |