twofactor

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fido2TwoFactor

func Fido2TwoFactor(challengeB64 string, credentials []string, config *config.Config) (string, error)

Types

type Fido2Response

type Fido2Response struct {
	Id         string `json:"id"`
	RawId      string `json:"rawId"`
	Type_      string `json:"type"`
	Extensions struct {
		Appid bool `json:"appid"`
	} `json:"extensions"`
	Response struct {
		AuthenticatorData string `json:"authenticatorData"`
		ClientDataJSON    string `json:"clientDataJson"`
		Signature         string `json:"signature"`
	} `json:"response"`
}

type TwoFactorProvider

type TwoFactorProvider int
const (
	Authenticator   TwoFactorProvider = 0
	Email           TwoFactorProvider = 1
	Duo             TwoFactorProvider = 2 //Not supported
	YubiKey         TwoFactorProvider = 3 //Not supported
	U2f             TwoFactorProvider = 4 //Not supported
	Remember        TwoFactorProvider = 5 //Not supported
	OrganizationDuo TwoFactorProvider = 6 //Not supported
	WebAuthn        TwoFactorProvider = 7
)

func PerformSecondFactor

func PerformSecondFactor(resp *TwoFactorResponse, cfg *config.Config) (TwoFactorProvider, []byte, error)

func (*TwoFactorProvider) UnmarshalText

func (t *TwoFactorProvider) UnmarshalText(text []byte) error

type TwoFactorResponse

type TwoFactorResponse struct {
	TwoFactorProviders2 map[TwoFactorProvider]map[string]interface{}
}

Jump to

Keyboard shortcuts

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