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

terraform_registry_token.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ae7df49835ff7d7c5385ebbc3cf2f09efab9bd33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Gitlab
  class TerraformRegistryToken < JWTToken
    class << self
      def from_token(token)
        new.tap do |terraform_registry_token|
          terraform_registry_token['token'] = token.try(:token).presence || token.try(:id).presence
        end
      end
    end
  end
end