Documentation
¶
Overview ¶
internal/auth/token.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerToken ¶
BearerToken formats a JWT as a Bearer auth header value.
func EmptyProto ¶
EmptyProto returns a commonv1.Empty message (convenience).
func GetPATOnce ¶
func GetPATOnce() string
GetPATOnce returns NWEB_API_KEY without storing it anywhere. Only for auth commands that explicitly manage PATs.
Types ¶
type Resolver ¶
type Resolver struct {
Profile config.Profile
ProfileName string
WorkspaceID string // flag override
NoPersist bool
ConfigPath string
Insecure bool
// OnTokenRefreshed is called after a successful PAT exchange.
OnTokenRefreshed func(jwt string, expiresAt time.Time, workspaceID string)
}
Resolver resolves a valid JWT for API calls.
Click to show internal directories.
Click to hide internal directories.