Sha256: 977b5dffc07a8f11b9292cf48b2920f38ac4b59ca36ec227e78e776e094b7183

Contents?: true

Size: 927 Bytes

Versions: 19

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

require_relative "includes"
require_relative "repository"
require_relative "../../profile_configuration"

class AwsAssumeRole::Credentials::Factories::AbstractFactory
    include AwsAssumeRole
    include AwsAssumeRole::Credentials::Factories
    include AwsAssumeRole::Logging

    Dry::Types.register_class(Aws::SharedCredentials)
    attr_reader :credentials, :region, :profile, :role_arn

    def initialize(_options)
        raise "Not implemented"
    end

    def self.type(str)
        @type = Types::Strict::Symbol.enum(:credential_provider, :second_factor_provider, :instance_role_provider)[str]
        register_if_complete
    end

    def self.priority(i)
        @priority = Types::Strict::Int[i]
        register_if_complete
    end

    def self.register_if_complete
        return unless @type && @priority
        Repository.register_factory(self, @type, @priority)
    end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
aws_assume_role-1.1.1 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.1-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.1-universal-openbsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.1-universal-darwin lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.1-universal-freebsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.1-universal-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.0-universal-openbsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.0-universal-darwin lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.0-universal-freebsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.0-universal-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.6-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.1.0-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.6 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.5 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.4 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.3 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.2 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.1 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.0.0 lib/aws_assume_role/credentials/factories/abstract_factory.rb