diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-04-18 17:03:27 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-04-23 01:50:55 +0300 |
commit | f10c999bca2b5b37b068ff3680a6e35a6707828d (patch) | |
tree | a517f86544c1544ee25d174652a003fff9b199a0 /lib/gitlab/auth/omniauth_identity_linker_base.rb | |
parent | c212908aad9b32352653dfe9ca966f148c8dfc1a (diff) |
Refactor OmniauthCallbacksController to remove duplication
Moves LDAP to its own controller with tests
Provides path forward for implementing GroupSaml
Diffstat (limited to 'lib/gitlab/auth/omniauth_identity_linker_base.rb')
-rw-r--r-- | lib/gitlab/auth/omniauth_identity_linker_base.rb | 21 |
1 files changed, 21 insertions, 0 deletions
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 |