duo

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Name    string            // phone1, ...
	Factors map[string]Factor // 'Duo Push', 'Phone Call', 'Passcode'
}

type Devices

type Devices map[string]Device

func Login

func Login(c *http.Client, requester LoginRequester) (Devices, error)

DUO entry point, client needs to be configured with cookiejar and requester submit method needs to return initial DUO login screen

type Factor

type Factor struct {
	Device string
	Name   string
	// contains filtered or unexported fields
}

func (Factor) LoadAWSRoles

func (f Factor) LoadAWSRoles(passcode string) (aws.Roles, error)

passcode is required only for 'Passcode' factor

type Frame

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

func NewFrame

func NewFrame(client *http.Client, duoHost, sid string) *Frame

func (*Frame) IsStatusAllowed

func (f *Frame) IsStatusAllowed() (bool, error)

func (*Frame) LoadSamlLogin

func (f *Frame) LoadSamlLogin(loginResponse loginResponse) (SamlLoginForm, error)

func (*Frame) SubmitPrompt

func (f *Frame) SubmitPrompt(device, name, passcode string) error

type LoginRequester

type LoginRequester interface {
	Submit(c *http.Client) (*http.Response, error)
}

http response is expected to include DUO login form (response from initial company login screen)

type SamlLoginForm

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

func NewSamlLoginForm

func NewSamlLoginForm(loginResponse loginResponse, cookie string) SamlLoginForm

func (SamlLoginForm) Submit

func (f SamlLoginForm) Submit(c *http.Client) (*http.Response, error)

Jump to

Keyboard shortcuts

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