Skip to content

Refactor OmniauthCallbacksController to remove duplication

James Edwards-Jones requested to merge jej/refactor-omniauth-controller into master

What does this MR do?

Begin refactoring OmniauthCallbacksController.

  • Creates specific controller for LDAP, instead of duplicating methods with an ldap_ prefix.
  • Adds LDAP controller tests.
  • Extracts IdentityLinker object to handle code paths which differ between saml and handle_omniauth.

Why was this MR needed?

Much duplication.

I'll be adding a new :group_saml provider with different logic in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4076 and didn't want to duplicate things yet again.

Acceptance criteria

Related

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/26559 with 6ab92416

Edited by James Edwards-Jones

Merge request reports