duo

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package duo provides a Duo MFA handler to authenticate users with Duo. This handler is registered as the "duo" type in mfa_config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DuoHandler

func DuoHandler(ctx context.Context, req *logical.Request, d *framework.FieldData, resp *logical.Response) (
	*logical.Response, error)

DuoHandler interacts with the Duo Auth API to authenticate a user login request. If successful, the original response from the login backend is returned.

func DuoPaths

func DuoPaths() []*framework.Path

DuoPaths returns path functions to configure Duo.

func DuoRootPaths

func DuoRootPaths() []string

DuoRootPaths returns the paths that are used to configure Duo.

Types

type AuthClient

type AuthClient interface {
	Preauth(options ...func(*url.Values)) (*authapi.PreauthResult, error)
	Auth(factor string, options ...func(*url.Values)) (*authapi.AuthResult, error)
}

func GetDuoAuthClient

func GetDuoAuthClient(ctx context.Context, req *logical.Request, config *DuoConfig) (AuthClient, error)

type DuoAccess

type DuoAccess struct {
	SKey string `json:"skey"`
	IKey string `json:"ikey"`
	Host string `json:"host"`
}

type DuoConfig

type DuoConfig struct {
	UsernameFormat string `json:"username_format"`
	UserAgent      string `json:"user_agent"`
	PushInfo       string `json:"push_info"`
}

func GetDuoConfig

func GetDuoConfig(ctx context.Context, req *logical.Request) (*DuoConfig, error)

Jump to

Keyboard shortcuts

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