polldevicecode

package
v1.47.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPending  = errors.New("authorization_pending")
	ErrSlowDown = errors.New("slow_down")
	ErrDenied   = errors.New("access_denied")
	// ErrExpired is a code expired, unknown or already exchanged: the CLI starts the login again.
	ErrExpired = errors.New("expired_token")
)

The answers of a poll before the token, RFC 8628 §3.5: their text is the code the CLI switches on.

Lifetime is how long the token of the CLI works, from its login: one of createapitoken.Lifetimes, set by tide-server serve --cli-token-lifetime.

Functions

func Process

func Process(ctx context.Context, db bun.IDB, input Input) *run

Process answers a poll of the CLI: once the account allowed its code, a token of the CLI (domain.TokenCLI) for that account, and the code is gone; before, one of the sentinel errors.

Types

type Input

type Input struct {
	DeviceCode string `json:"device_code"`
}

Jump to

Keyboard shortcuts

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