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

id_token.rb « entry « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 12e0975d1b175a64033bafa67a5d4ba9cc757776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Gitlab
  module Ci
    class Config
      module Entry
        ##
        # Entry that represents a JWT definition.
        #
        class IdToken < ::Gitlab::Config::Entry::Node
          include ::Gitlab::Config::Entry::Attributable
          include ::Gitlab::Config::Entry::Validatable

          attributes %i[aud]

          validations do
            validates :config, required_keys: %i[aud], allowed_keys: %i[aud]
            validates :aud, array_of_strings_or_string: true
          end

          def value
            { aud: aud }
          end
        end
      end
    end
  end
end