btn

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSubmitted2FARejected = errors.New("trackers: BTN submitted 2FA rejected")

ErrSubmitted2FARejected marks a BTN failure after a submitted manual 2FA code reached the tracker and was rejected.

Functions

func ResolveSessionForTrackerAuth added in v0.2.1

func ResolveSessionForTrackerAuth(ctx context.Context, cfg config.TrackerConfig, dbPath string) error

ResolveSessionForTrackerAuth validates BTN stored cookies or logs in with configured credentials. Credential login must produce reusable cookies before refreshed cookies are persisted.

func ResolveSessionForTrackerAuthLogin added in v0.2.1

func ResolveSessionForTrackerAuthLogin(ctx context.Context, cfg config.TrackerConfig, dbPath string, login api.TrackerAuthLoginRequest) error

ResolveSessionForTrackerAuthLogin validates BTN stored cookies or logs in with configured credentials. Refreshed cookies are persisted only after the upload page confirms the session. Manual login.Code is preferred over configured TOTP. Missing 2FA input preserves existing cookies; a rejected submitted code returns ErrSubmitted2FARejected before persistence.

Types

type Definition

type Definition struct{}

func New

func New() *Definition

func (*Definition) BuildDescription

func (*Definition) BuildUploadDryRun

func (d *Definition) BuildUploadDryRun(ctx context.Context, req trackers.UploadRequest) (api.TrackerDryRunEntry, error)

func (*Definition) Name

func (d *Definition) Name() string

func (*Definition) Upload

Jump to

Keyboard shortcuts

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