Documentation
¶
Overview ¶
SPDX-License-Identifier: Apache-2.0 Copyright (c) 2025 Scott Friedman and Project Contributors
Index ¶
Constants ¶
View Source
const ( // DefaultConfigFile is the default config file name DefaultConfigFile = "globus-cli-config" // DefaultTokenFile is the default token file name DefaultTokenFile = "globus-cli-token" // DefaultRedirectURI is the redirect URI for browser-based auth DefaultRedirectURI = "http://localhost:8080/callback" )
Variables ¶
This section is empty.
Functions ¶
func IsTokenValid ¶
IsTokenValid checks if a token is still valid (not expired)
func LogoutCommand ¶
LogoutCommand handles the logout command
Types ¶
type CallbackResult ¶
CallbackResult holds the result of the OAuth callback
type CallbackServer ¶
type CallbackServer struct {
Server *http.Server
ResultChan chan CallbackResult
}
CallbackServer is a simple HTTP server for handling OAuth callbacks
type Config ¶
type Config struct {
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
TokensDir string `json:"tokens_dir"`
}
Config holds the CLI configuration
func LoadOrCreateConfig ¶
LoadOrCreateConfig loads the CLI configuration from disk
type TokenInfo ¶
type TokenInfo struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
ExpiresIn int `json:"expires_in"`
ExpiresAt time.Time `json:"expires_at"`
Scope string `json:"scope"`
TokenType string `json:"token_type"`
ResourceID string `json:"resource_id,omitempty"`
}
TokenInfo holds the token information
Click to show internal directories.
Click to hide internal directories.