From f10c999bca2b5b37b068ff3680a6e35a6707828d Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Wed, 18 Apr 2018 15:03:27 +0100 Subject: Refactor OmniauthCallbacksController to remove duplication Moves LDAP to its own controller with tests Provides path forward for implementing GroupSaml --- lib/gitlab/auth/omniauth_identity_linker_base.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/gitlab/auth/omniauth_identity_linker_base.rb (limited to 'lib/gitlab/auth/omniauth_identity_linker_base.rb') diff --git a/lib/gitlab/auth/omniauth_identity_linker_base.rb b/lib/gitlab/auth/omniauth_identity_linker_base.rb new file mode 100644 index 00000000000..c60d9f70a99 --- /dev/null +++ b/lib/gitlab/auth/omniauth_identity_linker_base.rb @@ -0,0 +1,21 @@ +module Gitlab + module Auth + class OmniauthIdentityLinkerBase + attr_reader :current_user, :oauth + + def initialize(current_user, oauth) + @current_user = current_user + @oauth = oauth + @created = false + end + + def created? + @created + end + + def create_or_update + raise NotImplementedError + end + end + end +end -- cgit v1.2.3