mfa

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mfa provides wrappers to add multi-factor authentication to any auth method.

To add MFA to a backend, replace its login path with the paths returned by MFAPaths and add the additional root paths returned by MFARootPaths. The backend provides the username to the MFA wrapper in Auth.Metadata['username'].

To add an additional MFA type, create a subpackage that implements [Type]Paths, [Type]RootPaths, and [Type]Handler functions and add them to MFAPaths, MFARootPaths, and handlers respectively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MFAPaths

func MFAPaths(originalBackend *framework.Backend, loginPath *framework.Path) []*framework.Path

MFAPaths returns paths to wrap the original login path and configure MFA. When adding MFA to a backend, these paths should be included instead of the login path in Backend.Paths.

func MFARootPaths

func MFARootPaths() []string

MFARootPaths returns path strings used to configure MFA. When adding MFA to a backend, these paths should be included in Backend.PathsSpecial.Root.

Types

type HandlerFunc

HandlerFunc is the callback called to handle MFA for a login request.

type MFAConfig

type MFAConfig struct {
	Type string `json:"type"`
}

Directories

Path Synopsis
Package duo provides a Duo MFA handler to authenticate users with Duo.
Package duo provides a Duo MFA handler to authenticate users with Duo.

Jump to

Keyboard shortcuts

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