http

package
v0.0.0-...-301dc46 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Krb5Config = `` /* 514-byte string literal not displayed */

Variables

View Source
var AuthMethodMap = map[string]AuthMethod{
	"ntlm":     Ntlm,
	"kerberos": Kerberos,
}

Functions

func PostAdcsRequest

func PostAdcsRequest(user, pass, csr string, config *CertConfig) (cert []byte, err error)

Types

type AuthMethod

type AuthMethod byte
const (
	Ntlm AuthMethod = 1 << iota
	Kerberos
)

func (AuthMethod) String

func (authMethod AuthMethod) String() string

type CertConfig

type CertConfig struct {
	AdcsUrl          string
	OidTemplate      string
	AdcsAuthMethods  AuthMethod
	AdcsAuthKrb5conf string
	AdcsAuthUser     string
	AdcsAuthRealm    string
	AdcsAuthKeytab   string
	AdcsAuthKdcs     []string
}

func (*CertConfig) ClearAuthMethods

func (config *CertConfig) ClearAuthMethods()

func (*CertConfig) HasAuthMethod

func (config *CertConfig) HasAuthMethod(method AuthMethod) bool

func (*CertConfig) SetAuthMethod

func (config *CertConfig) SetAuthMethod(method AuthMethod)

func (*CertConfig) SetAuthMethodString

func (config *CertConfig) SetAuthMethodString(methodString string)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(authMethod AuthMethod, user, pass, keytabFilename, realm, krb5Config string) (*Client, error)

func (*Client) Destroy

func (c *Client) Destroy()

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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