| 1 |
GitHub |
| 2 |
====== |
| 3 |
|
| 4 |
============== ===== ======== |
| 5 |
Authentication Users Password |
| 6 |
============== ===== ======== |
| 7 |
✔ |
| 8 |
============== ===== ======== |
| 9 |
|
| 10 |
Presentation |
| 11 |
------------ |
| 12 |
|
| 13 |
`GitHub <https://github.com/>`__ uses |
| 14 |
`OAuth2 <http://en.wikipedia.org/wiki/OAuth2>`__ protocol to allow |
| 15 |
applications to reuse its own authentication process (see |
| 16 |
https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/). |
| 17 |
|
| 18 |
You need to register a new application on LinkedIn to get an application |
| 19 |
ID and a secret: https://github.com/settings/apps/new. |
| 20 |
|
| 21 |
Configuration |
| 22 |
------------- |
| 23 |
|
| 24 |
In Manager, go in ``General Parameters`` > ``Authentication modules`` |
| 25 |
and choose GitHub for authentication module. |
| 26 |
|
| 27 |
Then, go in ``GitHub parameters``: |
| 28 |
|
| 29 |
- **Authentication level**: authentication level for this module. |
| 30 |
- **Client ID**: the application ID you get |
| 31 |
- **Client secret**: the corresponding secret |
| 32 |
- **Field containing user identifier**: Field that will be used as main |
| 33 |
user identifier in LL::NG, usually ``login`` |
| 34 |
- **Scope**: OAuth 2.0 scopes, see |
| 35 |
https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/ |
| 36 |
|
| 37 |
|
| 38 |
.. tip:: |
| 39 |
|
| 40 |
Collected fields are stored in session in ``github_`` |
| 41 |
keys |
| 42 |
|
| 43 |
|
| 44 |
.. attention:: |
| 45 |
|
| 46 |
Browser implementations of formAction directive are |
| 47 |
inconsistent (e.g. Firefox doesn't block the redirects whereas Chrome |
| 48 |
does). Administrators may have to modify formAction value with wildcard |
| 49 |
likes \*. |
| 50 |
|
| 51 |
In Manager, go in: |
| 52 |
|
| 53 |
``General Parameters`` > ``Advanced Parameters`` > ``Security`` > |
| 54 |
``Content Security Policy`` > ``Form destination`` |