Documentation ¶
Overview ¶
Package webauthnwin is wrapper around Windows webauthn API. It loads system webauthn.dll and uses its methods. It supports API versions 1+. API definition: https://github.com/microsoft/webauthn/blob/master/webauthn.h As Windows Webauthn device can be used both Windows Hello and FIDO devices.
Index ¶
- Variables
- func IsAvailable() 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)
- type AuthenticatorAttachment
- type CheckSupportResult
- type DiagResult
- type GUID
- type LoginOpts
Constants ¶
This section is empty.
Variables ¶
var ( // PromptPlatformMessage is the message shown before Touch ID prompts. PromptPlatformMessage = "Using platform authenticator, follow the OS dialogs" // PromptWriter is the writer used for prompt messages. PromptWriter io.Writer = os.Stderr )
Functions ¶
func IsAvailable ¶
func IsAvailable() bool
IsAvailable returns true if Windows webauthn library is available in the system. Typically, a series of checks is performed in an attempt to avoid false positives. See CheckSupport.
func Login ¶
func Login(ctx context.Context, origin string, assertion *wanlib.CredentialAssertion, loginOpts *LoginOpts) (*proto.MFAAuthenticateResponse, string, error)
Login implements Login for Windows Webauthn API.
func Register ¶
func Register( ctx context.Context, origin string, cc *wanlib.CredentialCreation, ) (*proto.MFARegisterResponse, error)
Register implements Register for Windows Webauthn API.
Types ¶
type AuthenticatorAttachment ¶
type AuthenticatorAttachment int
const ( AttachmentAuto AuthenticatorAttachment = iota AttachmentCrossPlatform AttachmentPlatform )
type CheckSupportResult ¶
type CheckSupportResult struct { HasCompileSupport bool IsAvailable bool HasPlatformUV bool WebAuthnAPIVersion int }
CheckSupport is the result from a Windows webauthn support check.
func CheckSupport ¶
func CheckSupport() CheckSupportResult
CheckSupport return information whether Windows Webauthn is supported and information about API version.
type DiagResult ¶
type LoginOpts ¶
type LoginOpts struct { // AuthenticatorAttachment specifies the desired authenticator attachment. AuthenticatorAttachment AuthenticatorAttachment }
LoginOpts groups non-mandatory options for Login.