lemonldap-ng/doc/sources/admin/authgithub.rst

55 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2020-05-14 23:29:41 +02:00
GitHub
======
============== ===== ========
Authentication Users Password
============== ===== ========
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
============== ===== ========
Presentation
------------
`GitHub <https://github.com/>`__ uses
`OAuth2 <http://en.wikipedia.org/wiki/OAuth2>`__ protocol to allow
applications to reuse its own authentication process (see
https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/).
You need to register a new application on LinkedIn to get an application
ID and a secret: https://github.com/settings/apps/new.
Configuration
-------------
In Manager, go in ``General Parameters`` > ``Authentication modules``
and choose GitHub for authentication module.
Then, go in ``GitHub parameters``:
- **Authentication level**: authentication level for this module.
- **Client ID**: the application ID you get
- **Client secret**: the corresponding secret
- **Field containing user identifier**: Field that will be used as main
user identifier in LL::NG, usually ``login``
- **Scope**: OAuth 2.0 scopes, see
https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/
2020-05-18 09:56:39 +02:00
.. tip::
2020-05-14 23:29:41 +02:00
Collected fields are stored in session in ``github_``
keys
2020-05-21 15:13:24 +02:00
.. attention::
2020-05-14 23:29:41 +02:00
Browser implementations of formAction directive are
inconsistent (e.g. Firefox doesn't block the redirects whereas Chrome
does). Administrators may have to modify formAction value with wildcard
likes \*.
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
In Manager, go in:
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
``General Parameters`` > ``Advanced Parameters`` > ``Security`` >
2020-05-18 09:56:39 +02:00
``Content Security Policy`` > ``Form destination``