authn

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Overview

Package authn implements WebAuthn Cmd to Register and Login.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	SubCmd        string `json:"sub_cmd"`
	UserName      string `json:"user_name"`
	PublicDIDSeed string `json:"public_did_seed"`
	Url           string `json:"url,omitempty"`
	AAGUID        string `json:"aaguid,omitempty"`
	Key           string `json:"key,omitempty"`
	Counter       uint64 `json:"counter,omitempty"`
	Token         string `json:"token,omitempty"`
	Origin        string `json:"origin,omitempty"`

	RegisterBegin  Endpoint `json:"register_1,omitempty"`
	RegisterFinish Endpoint `json:"register_2,omitempty"`
	LoginBegin     Endpoint `json:"login_1,omitempty"`
	LoginFinish    Endpoint `json:"login_2,omitempty"`

	CookiePath string `json:"cookie_path,omitempty"`
	CookieFile string `json:"cookie_file,omitempty"`

	SecEnclave enclave.Secure `json:"-"`
}

func (*Cmd) Exec

func (ac *Cmd) Exec(_ io.Writer) (r Result, err error)

func (Cmd) TryReadJSON

func (ac Cmd) TryReadJSON(r io.Reader) Cmd

func (*Cmd) Validate

func (ac *Cmd) Validate() (err error)

type Endpoint added in v0.1.51

type Endpoint struct {
	Method   string `json:"method,omitempty"`
	Path     string `json:"path,omitempty"`
	Payload  string `json:"payload,omitempty"`
	InPL     string `json:"inputPL,omitempty"`
	MiddlePL string `json:"middlePL,omitempty"`
}

type Result

type Result struct {
	SubCmd string `json:"sub_cmd,omitempty"`
	Token  string `json:"token"`
}

func (Result) String

func (r Result) String() string

Jump to

Keyboard shortcuts

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