sshautn

package
v0.0.0-...-19babe2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHAuthenticator

type SSHAuthenticator struct {
	LogLevel        uint
	UserAgentString string
	// contains filtered or unexported fields
}

SSHAuthenticator is the master struct with private fields to handle the authentication

func NewAuthenticator

func NewAuthenticator(baseURL string, client *http.Client) (*SSHAuthenticator, error)

NewAuthenticator creates a new Authenticator struct for the given client and targetURL for authentication.

func (*SSHAuthenticator) DoLogin

func (s *SSHAuthenticator) DoLogin() ([]byte, http.Header, error)

DoLogin will do the authentication step against an authenticator, will return the content and headers of the authentication call. Is it up to the implementors to carry the session. It will use the running SSH agent and will fail if there is no agent.

func (*SSHAuthenticator) DoLoginWithAgent

func (s *SSHAuthenticator) DoLoginWithAgent(agentClient agent.Agent) ([]byte, http.Header, error)

DoLoginWithAgent will perform the same as DoLogin, but with an explicit ssh agent. This can be used when an actual agent is not exist on the system

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL