identitydiag

package
v1.0.99 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 16 Imported by: 0 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

View Source
const (
	StatusReady         = "ready"
	StatusNotConfigured = "not_configured"
	StatusMissing       = "missing"
	StatusNeedsRefresh  = "needs_refresh"
	StatusVerifyFailed  = "verify_failed"
	StatusError         = "error"
)

Variables

This section is empty.

Functions

func StatusMessage

func StatusMessage(status string) string

Types

type Identity

type Identity struct {
	Status           string          `json:"status"`
	Available        bool            `json:"available"`
	Verified         *bool           `json:"verified,omitempty"`
	Message          string          `json:"message,omitempty"`
	Hint             string          `json:"hint,omitempty"`
	Error            errs.TypedError `json:"error,omitempty"`
	OpenID           string          `json:"openId,omitempty"`
	AppName          string          `json:"appName,omitempty"`
	UserName         string          `json:"userName,omitempty"`
	TokenStatus      string          `json:"tokenStatus,omitempty"`
	Scope            string          `json:"scope,omitempty"`
	ExpiresAt        string          `json:"expiresAt,omitempty"`
	RefreshExpiresAt string          `json:"refreshExpiresAt,omitempty"`
	GrantedAt        string          `json:"grantedAt,omitempty"`
	// Local token metadata is projected by auth status without loading the key
	// a second time and potentially disagreeing with this readiness result.
	TokenType            string `json:"-"`
	DPoPKeyStatus        string `json:"-"`
	DPoPKeyProvider      string `json:"-"`
	DPoPKeySecurityLevel string `json:"-"`
	// contains filtered or unexported fields
}

Identity is a single identity diagnostic result.

type Result

type Result struct {
	Bot  Identity `json:"bot"`
	User Identity `json:"user"`
}

Result describes the independently usable bot and user identities.

func Diagnose

func Diagnose(ctx context.Context, f *cmdutil.Factory, cfg *core.CliConfig, verify bool) Result

Diagnose checks bot and user identities separately. When verify is false, it only reports local readiness and skips server calls.

func FilterRecovery added in v1.0.84

func FilterRecovery(result Result, projector *recovery.Projector) Result

FilterRecovery projects both diagnostic hint fields onto the command surface.

Jump to

Keyboard shortcuts

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