device

package
v0.2.92 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Key        flow.Key = "device"
	GCInterval          = time.Minute
	Expiry              = time.Minute * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

func New

func New(storage storage.Device, logger *zerolog.Logger) *Device

func (*Device) CompleteFlow

func (g *Device) CompleteFlow(ctx context.Context, identifier string, sessionID string, encryptedSession string, expiry time.Time) error

func (*Device) FlowExists

func (g *Device) FlowExists(ctx context.Context, identifier string) (bool, error)

func (*Device) Key

func (g *Device) Key() flow.Key

func (*Device) PollFlow

func (g *Device) PollFlow(ctx context.Context, userCode string) (string, time.Time, time.Time, error)

func (*Device) Start

func (g *Device) Start() error

func (*Device) StartFlow

func (g *Device) StartFlow(ctx context.Context) (string, string, error)

func (*Device) Stop

func (g *Device) Stop() error

func (*Device) ValidateFlow

func (g *Device) ValidateFlow(ctx context.Context, deviceCode string) (string, error)

Jump to

Keyboard shortcuts

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