Sha256: 7b292f66035539357e9d8ef98f20c164b15f26a4c07b6308652ddde711fb9c4c

Contents?: true

Size: 950 Bytes

Versions: 18

Compression:

Stored size: 950 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("aws.sharedcredentials", 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::Integer[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

18 entries across 18 versions & 1 rubygems

Version Path
aws_assume_role-1.2.3-universal-freebsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.3-universal-darwin lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.3-universal-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.3-universal-openbsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.3 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.3-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2-universal-darwin lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2-universal-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2-universal-openbsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2-universal-freebsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.2 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1 lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1-universal-openbsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1-universal-darwin lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1-universal-freebsd lib/aws_assume_role/credentials/factories/abstract_factory.rb
aws_assume_role-1.2.1-universal-linux lib/aws_assume_role/credentials/factories/abstract_factory.rb