Versions in this module Expand all Collapse all v11 v11.3.3 Dec 13, 2022 Changes in this version + var DevicePollInterval = 200 * time.Millisecond + var ErrAlreadyRegistered = errors.New("already registered") + var FIDO2PollInterval = 200 * time.Millisecond + func FIDO2Login(ctx context.Context, origin string, assertion *wanlib.CredentialAssertion, ...) (*proto.MFAAuthenticateResponse, string, error) + func FIDO2Register(ctx context.Context, origin string, cc *wanlib.CredentialCreation, ...) (*proto.MFARegisterResponse, error) + func HasPlatformSupport() bool + func IsFIDO2Available() bool + func Login(ctx context.Context, origin string, assertion *wanlib.CredentialAssertion, ...) (*proto.MFAAuthenticateResponse, string, error) + func Register(ctx context.Context, origin string, cc *wanlib.CredentialCreation, ...) (*proto.MFARegisterResponse, error) + func RunOnU2FDevices(ctx context.Context, runCredentials ...func(Token) error) error + func ToTouchIDCredentialPicker(p credentialPicker) touchid.CredentialPicker + func U2FLogin(ctx context.Context, origin string, assertion *wanlib.CredentialAssertion) (*proto.MFAAuthenticateResponse, error) + func U2FRegister(ctx context.Context, origin string, cc *wanlib.CredentialCreation) (*proto.MFARegisterResponse, error) + type AuthenticatorAttachment int + const AttachmentAuto + const AttachmentCrossPlatform + const AttachmentPlatform + func (a AuthenticatorAttachment) String() string + type CollectedClientData struct + Challenge string + Origin string + Type string + type CredentialInfo struct + ID []byte + User UserInfo + type DefaultPrompt struct + FirstTouchMessage string + PINMessage string + PromptCredentialMessage string + SecondTouchMessage string + func NewDefaultPrompt(ctx context.Context, out io.Writer) *DefaultPrompt + func (p *DefaultPrompt) PromptCredential(creds []*CredentialInfo) (*CredentialInfo, error) + func (p *DefaultPrompt) PromptPIN() (string, error) + func (p *DefaultPrompt) PromptTouch() error + type FIDO2DiagResult struct + Available bool + LoginSuccessful bool + RegisterSuccessful bool + func FIDO2Diag(ctx context.Context, promptOut io.Writer) (*FIDO2DiagResult, error) + type LoginOpts struct + AuthenticatorAttachment AuthenticatorAttachment + User string + type LoginPrompt interface + PromptCredential func(creds []*CredentialInfo) (*CredentialInfo, error) + PromptPIN func() (string, error) + PromptTouch func() error + type RegisterPrompt interface + PromptPIN func() (string, error) + PromptTouch func() error + type Token interface + Authenticate func(req u2ftoken.AuthenticateRequest) (*u2ftoken.AuthenticateResponse, error) + CheckAuthenticate func(req u2ftoken.AuthenticateRequest) error + Register func(req u2ftoken.RegisterRequest) ([]byte, error) + type UserInfo struct + Name string + UserHandle []byte