device

package
v0.46.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package device provides DataTug's shared auth.sneat.co device-login command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Command returns the DataTug auth.sneat.co commands. It is separate from auth google and the GitHub repository authorization flow, which grant different provider permissions and remain unchanged.

func LoginCommand

func LoginCommand() *cobra.Command

LoginCommand, StatusCommand, and LogoutCommand are mounted directly under `datatug auth` so the shared sign-in has the conventional CLI shape.

func LogoutCommand

func LogoutCommand() *cobra.Command

func StatusCommand

func StatusCommand() *cobra.Command

Types

type RefreshSession

type RefreshSession func(context.Context, string) (session, error)

RefreshSession exchanges a Firebase refresh token for the current session. It is injected so the identity endpoint is never hard-wired in tests.

type TokenSource

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

TokenSource loads the DataTug Firebase session, refreshes it before expiry, and atomically replaces the scoped credential before returning a bearer. Authenticated DataTug commands use this rather than a static one-shot token.

func (*TokenSource) Token

func (s *TokenSource) Token() (*oauth2.Token, error)

Jump to

Keyboard shortcuts

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