spnego

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKRB5Conf

func GenerateKRB5Conf(domain string, kdcs []string) (string, error)

GenerateKRB5Conf a basic krb5.conf string

Types

type Error

type Error struct {
	Err error
}

Error is used to distinguish errors from underlying libraries (gokrb5 or sspi).

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface

type Krb5Conf

type Krb5Conf struct {
	Domain string
	Kdcs   []string
}

Krb5Conf config template data

type Options

type Options struct {
	Username   string
	Password   string
	Domain     string
	KDC        []string
	KRB5Config string
}

Options options

type Provider

type Provider interface {
	SetSPNEGOHeader(*http.Request) error
}

Provider is the interface that wraps OS agnostic functions for handling SPNEGO communication

func New

func New(opts *Options) Provider

New constructs OS specific implementation of spnego.Provider interface

type Transport

type Transport struct {
	http.Transport

	Username   string
	Password   string
	Domain     string
	KDC        []string
	KRB5Config string
	// contains filtered or unexported fields
}

Transport extends the native http.Transport to provide SPNEGO communication

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

Jump to

Keyboard shortcuts

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