adfs

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FrozenUserAgent is a static user agent that we use for all requests. This
	// value is based on the UA client hint work within browsers.
	// Additional details: https://bugs.chromium.org/p/chromium/issues/detail?id=955620
	FrozenUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" +
		"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3764.0 Safari/537.36"
)

Variables

View Source
var (
	// RateLimiter limits requests from the same worker to a maximum of 3/s
	RateLimiter = rate.NewLimiter(rate.Every(300*time.Millisecond), 1)
)

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver implements the nozzle.Driver interface.

func (Driver) New

func (Driver) New(opts map[string]string) (nozzle.Nozzle, error)

New is used to create an adfs nozzle and accepts the following configuration options:

domain

The subdomain of the adfs organization. If a user logs in at https://example.adfs.com/adfs/ls, the value of domain is "example.adfs.com".

strategy

The authenticate strategy to use. This can be one of the following: usernamemixed (default) or ntlm (bypasses external lockout).

type Nozzle

type Nozzle struct {
	// Domain is the adfs subdomain
	Domain string

	// Strategy is the adfs authentication strategy
	Strategy string

	// UserAgent will override the Go-http-client user-agent in requests
	UserAgent string
}

Nozzle implements the nozzle.Nozzle interface for adfs.

func (*Nozzle) Login

func (n *Nozzle) Login(username, password string) (*event.AuthResponse, error)

Login fulfils the nozzle.Nozzle interface and performs an authentication requests against adfs. This function supports rate limiting and parses valid, invalid, and locked out responses.

Jump to

Keyboard shortcuts

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