summaryrefslogtreecommitdiff
path: root/lib/gitlab/api_authentication/sent_through_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/api_authentication/sent_through_builder.rb')
-rw-r--r--lib/gitlab/api_authentication/sent_through_builder.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/api_authentication/sent_through_builder.rb b/lib/gitlab/api_authentication/sent_through_builder.rb
new file mode 100644
index 00000000000..f66e5960019
--- /dev/null
+++ b/lib/gitlab/api_authentication/sent_through_builder.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+# See Gitlab::APIAuthentication::Builder
+module Gitlab
+ module APIAuthentication
+ class SentThroughBuilder
+ def initialize(strategies, resolvers)
+ @strategies = strategies
+ @resolvers = resolvers
+ end
+
+ def sent_through(*locators)
+ locators.each do |locator|
+ @strategies[locator] |= @resolvers
+ end
+ end
+ end
+ end
+end