gitlab-org--gitlab-foss/lib/gitlab/api_authentication/builder.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
499 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
# Authentication Strategies Builder
#
# AuthBuilder and its child classes, TokenType and SentThrough, support
# declaring allowed authentication strategies with patterns like
# `accept.token_type(:job_token).sent_through(:http_basic)`.
module Gitlab
module APIAuthentication
class Builder
def build
strategies = Hash.new([])
yield ::Gitlab::APIAuthentication::TokenTypeBuilder.new(strategies)
strategies
end
end
end
end