Documentation
¶
Overview ¶
internal/security/auth.go
Index ¶
Constants ¶
View Source
const MinTokenLength = 32
MinTokenLength is the minimum byte length required for a valid bridge auth token.
Variables ¶
This section is empty.
Functions ¶
func ValidateFilePermissions ¶
ValidateFilePermissions checks that a bridge file has secure permissions (owner-only access on Unix). It is stateless, hence a package-level function.
Types ¶
type AuthManager ¶
type AuthManager struct {
// contains filtered or unexported fields
}
AuthManager handles secure token management for bridge communication
func NewAuthManager ¶
func NewAuthManager() *AuthManager
NewAuthManager creates a new authentication manager
func (*AuthManager) GetAuthHeaders ¶
func (am *AuthManager) GetAuthHeaders() map[string]string
GetAuthHeaders returns authentication headers for HTTP requests
func (*AuthManager) LoadTokenFromString ¶
func (am *AuthManager) LoadTokenFromString(token string) error
LoadTokenFromString loads and validates an auth token provided directly, such as the VSTR_TOKEN env var injected by the extension into its terminals.
Click to show internal directories.
Click to hide internal directories.