ntl-purism f3a93987b6 LDAP & PAM added to OAuth password grant strategy (#7999) (#12390)
When authenticating via OAuth, the resource owner password grant
strategy is allowed by Mastodon, but (without this PR), it does not
attempt to authenticate against LDAP or PAM. As a result, LDAP or PAM
authenticated users cannot sign in to Mastodon with their
email/password credentials via OAuth (for instance, for native/mobile
app users).

This PR fleshes out the authentication strategy supplied to doorkeeper
in its initializer by looking up the user with LDAP and/or PAM when
devise is configured to use LDAP/PAM backends. It attempts to follow the
same logic as the Auth::SessionsController for handling email/password
credentials.

Note #1: Since this pull request affects an initializer, it's unclear
how to add test automation.

Note #2: The PAM authentication path has not been manually tested. It
was added for completeness sake, and it is hoped that it can be manually
tested before merging.
2019-11-30 19:44:59 +01:00
..
2018-01-16 03:29:11 +01:00
2016-02-20 22:53:20 +01:00
2016-08-17 17:58:00 +02:00
2017-04-22 19:48:55 +02:00
2018-10-09 03:02:52 +02:00
2018-10-04 17:38:04 +02:00
2017-12-06 15:04:49 +09:00
2017-04-11 01:11:41 +02:00
2018-10-04 17:38:04 +02:00
2016-12-06 17:19:26 +01:00
2017-01-22 23:07:31 +01:00
2018-10-04 12:36:53 +02:00
2016-08-17 17:58:00 +02:00