You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/config/initializers
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.
5 years ago
..
0_post_deployment_migrations.rb
1_hosts.rb
2_whitelist_mode.rb
active_model_serializers.rb
application_controller_renderer.rb
assets.rb
backtrace_silencers.rb
blacklists.rb
chewy.rb
content_security_policy.rb
cookies_serializer.rb
cors.rb
delivery_job.rb
devise.rb
doorkeeper.rb LDAP & PAM added to OAuth password grant strategy (#7999) (#12390) 5 years ago
fast_blank.rb
ffmpeg.rb
filter_parameter_logging.rb
health_check.rb
http_client_proxy.rb
httplog.rb
inflections.rb
json_ld.rb Fix preloaded JSON-LD context for identity not being used (#12138) 5 years ago
kaminari_config.rb
mime_types.rb
oj.rb
omniauth.rb
open_uri_redirection.rb
pagination.rb
paperclip.rb Fix attachment not being re-downloaded even if file is not stored (#12125) 5 years ago
premailer_rails.rb
rack_attack.rb
rack_attack_logging.rb
redis.rb
session_activations.rb
session_store.rb
sidekiq.rb
simple_form.rb
single_user_mode.rb
statsd.rb
stoplight.rb
strong_migrations.rb
suppress_csrf_warnings.rb
trusted_proxies.rb
twitter_regex.rb
vapid.rb
wrap_parameters.rb