Sha256: 964377f6d7f862e974f7e38a75aa3efaf9cab1834bac6d4133612c25a47fdda2

Contents?: true

Size: 1.24 KB

Versions: 52

Compression:

Stored size: 1.24 KB

Contents

# Copyright (C) the Rugged contributors.  All rights reserved.
#
# This file is part of Rugged, distributed under the MIT license.
# For full terms see the included LICENSE file.

module Rugged
  module Credentials
    # A plain-text username and password credential object.
    class UserPassword
      def initialize(options)
        @username, @password = options[:username], options[:password]
      end

      def call(url, username_from_url, allowed_types)
        self
      end
    end

    # A ssh key credential object that can optionally be passphrase-protected
    class SshKey
      def initialize(options)
        @username, @publickey, @privatekey, @passphrase = options[:username], options[:publickey], options[:privatekey], options[:passphrase]
      end

      def call(url, username_from_url, allowed_types)
        self
      end
    end

    class SshKeyFromAgent
      def initialize(options)
        @username = options[:username]
      end

      def call(url, username_from_url, allowed_types)
        self
      end
    end

    # A "default" credential usable for Negotiate mechanisms like NTLM or
    # Kerberos authentication
    class Default
      def call(url, username_from_url, allowed_types)
        self
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
rugged-1.9.0 lib/rugged/credentials.rb
rugged-1.7.2 lib/rugged/credentials.rb
rugged-1.6.5 lib/rugged/credentials.rb
rugged-1.7.1 lib/rugged/credentials.rb
rugged-1.6.3 lib/rugged/credentials.rb
rugged-1.6.2 lib/rugged/credentials.rb
rugged-1.5.1 lib/rugged/credentials.rb
rugged-1.4.5 lib/rugged/credentials.rb
rugged-1.5.0.1 lib/rugged/credentials.rb
rugged-1.5.0 lib/rugged/credentials.rb
rugged-1.3.2.3 lib/rugged/credentials.rb
rugged-1.4.4 lib/rugged/credentials.rb
rugged-1.3.2.1 lib/rugged/credentials.rb
rugged-1.4.3 lib/rugged/credentials.rb
rugged-1.3.2 lib/rugged/credentials.rb
rugged-1.4.2 lib/rugged/credentials.rb
rugged-1.3.1 lib/rugged/credentials.rb
rugged-1.3.0 lib/rugged/credentials.rb
rugged-1.2.0 lib/rugged/credentials.rb
rugged-1.1.1 lib/rugged/credentials.rb