authenticationinfo

package
v0.0.0-...-2b8ec9a Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CookieDef = &httputil.CookieDef{
	NameSuffix: "authentication_info",
	Path:       "/",
	SameSite:   http.SameSiteNoneMode,
}
View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(StoreRedis), "*"),
)
View Source
var ErrNotFound = errors.New("authentication info entry not found")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID string `json:"id,omitempty"`
	T  T      `json:"t,omitempty"`
}

func NewEntry

func NewEntry(t T) *Entry

type StoreRedis

type StoreRedis struct {
	Context context.Context
	Redis   *appredis.Handle
	AppID   config.AppID
}

func (*StoreRedis) Delete

func (s *StoreRedis) Delete(entryID string) (err error)

func (*StoreRedis) Get

func (s *StoreRedis) Get(entryID string) (entry *Entry, err error)

func (*StoreRedis) Save

func (s *StoreRedis) Save(entry *Entry) (err error)

type T

type T struct {
	UserID string `json:"user_id,omitempty"`
	// AMR is authentication means used in the authentication.
	// On Android, we cannot tell the exact biometric means used in the authentication.
	// Therefore, we cannot reliably populate AMR.
	//
	// From RFC8176, the AMR values "swk" and "user" may apply.
	// See https://developer.android.com/reference/androidx/biometric/BiometricPrompt#AUTHENTICATION_RESULT_TYPE_BIOMETRIC
	AMR             []string  `json:"amr,omitempty"`
	AuthenticatedAt time.Time `json:"authenticated_at,omitempty"`
}

Jump to

Keyboard shortcuts

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