Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/api_authentication/token_type_builder.rb')
-rw-r--r--lib/gitlab/api_authentication/token_type_builder.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/api_authentication/token_type_builder.rb b/lib/gitlab/api_authentication/token_type_builder.rb
new file mode 100644
index 00000000000..4a57cdc2742
--- /dev/null
+++ b/lib/gitlab/api_authentication/token_type_builder.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+# See Gitlab::Auth::AuthBuilder
+module Gitlab
+ module APIAuthentication
+ class TokenTypeBuilder
+ def initialize(strategies)
+ @strategies = strategies
+ end
+
+ def token_types(*resolvers)
+ ::Gitlab::APIAuthentication::SentThroughBuilder.new(@strategies, resolvers)
+ end
+
+ alias_method :token_type, :token_types
+ end
+ end
+end