u2f

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Overview

Package twofa contains routines for getting short lived certificate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckU2FDevices

func CheckU2FDevices(logger log.DebugLogger) error

CheckU2FDevices checks the U2F devices and terminates the application by calling Fatal on the passed logger if the U2F devices cannot be read.

func DoU2FAuthenticate

func DoU2FAuthenticate(
	client *http.Client,
	baseURL string,
	userAgentString string,
	logger log.DebugLogger) error

DoU2FAuthenticate does U2F authentication

func WithDevicesDoU2FAuthenticate added in v1.13.3

func WithDevicesDoU2FAuthenticate(
	devices []*u2fhost.HidDevice,
	client *http.Client,
	baseURL string,
	userAgentString string,
	logger log.DebugLogger) error

func WithDevicesDoWebAuthnAuthenticate added in v1.13.3

func WithDevicesDoWebAuthnAuthenticate(
	devices []*u2fhost.HidDevice,
	client *http.Client,
	baseURL string,
	userAgentString string,
	logger log.DebugLogger) error

Types

type AuthenticatorResponse added in v1.13.3

type AuthenticatorResponse struct {
	AuthenticatorData string `json:"authenticatorData"`
	ClientDataJSON    string `json:"clientDataJSON"`
	Signature         string `json:"signature"`
	UserHandle        string `json:"userHandle"`
}

type ClientData added in v1.13.3

type ClientData struct {
	Typ                string      `json:"typ,omitempty"`
	Type               string      `json:"type,omitempty"`
	Challenge          string      `json:"challenge"`
	ChannelIdPublicKey interface{} `json:"cid_pubkey,omitempty"`
	Origin             string      `json:"origin"`
}

type WebAuthnAuthenticationResponse added in v1.13.3

type WebAuthnAuthenticationResponse struct {
	Id       string                `json:"id"`
	RawId    string                `json:"rawId"`
	Type     string                `json:"type"`
	Response AuthenticatorResponse `json:"response"`
}
type WebAuthnAuthenticationResponse struct {
        \"id\":\"bDtn39BgSSwOscXr3ruEGmegBVEd6yntysf8NiG2I2KDz7-CEiw9mIm1BvlQYfg9g1Rq38IpFwEj8Cxn_9uNlA\",\"rawId\":\"bDtn39BgSSwOscXr3ruEGmegBVEd6yntysf8NiG2I2KDz7-CEiw9mIm1BvlQYfg9g1Rq38IpFwEj8Cxn_9uNlA\",\"type\":\"public-key\",\"response\"

Jump to

Keyboard shortcuts

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