Versions in this module Expand all Collapse all v6 v6.9.3 Mar 25, 2026 Changes in this version + const CallbackPort + const DefaultAPIBaseURL + const SuccessRedirectURL + func CheckDuplicateBXAuth(authDir, bxAuth string) (string, error) + func ExtractBXAuth(cookie string) string + func NormalizeCookie(raw string) (string, error) + func SanitizeIFlowFileName(raw string) string + func ShouldRefreshAPIKey(expireTime string) (bool, time.Duration, error) + type IFlowAuth struct + func NewIFlowAuth(cfg *config.Config) *IFlowAuth + func (ia *IFlowAuth) AuthenticateWithCookie(ctx context.Context, cookie string) (*IFlowTokenData, error) + func (ia *IFlowAuth) AuthorizationURL(state string, port int) (authURL, redirectURI string) + func (ia *IFlowAuth) CreateCookieTokenStorage(data *IFlowTokenData) *IFlowTokenStorage + func (ia *IFlowAuth) CreateTokenStorage(data *IFlowTokenData) *IFlowTokenStorage + func (ia *IFlowAuth) ExchangeCodeForTokens(ctx context.Context, code, redirectURI string) (*IFlowTokenData, error) + func (ia *IFlowAuth) FetchUserInfo(ctx context.Context, accessToken string) (*userInfoData, error) + func (ia *IFlowAuth) RefreshAPIKey(ctx context.Context, cookie, name string) (*iFlowKeyData, error) + func (ia *IFlowAuth) RefreshTokens(ctx context.Context, refreshToken string) (*IFlowTokenData, error) + func (ia *IFlowAuth) UpdateCookieTokenStorage(storage *IFlowTokenStorage, keyData *iFlowKeyData) + func (ia *IFlowAuth) UpdateTokenStorage(storage *IFlowTokenStorage, data *IFlowTokenData) + type IFlowTokenData struct + APIKey string + AccessToken string + Cookie string + Email string + Expire string + RefreshToken string + Scope string + TokenType string + type IFlowTokenResponse struct + AccessToken string + ExpiresIn int + RefreshToken string + Scope string + TokenType string + type IFlowTokenStorage struct + APIKey string + AccessToken string + Cookie string + Email string + Expire string + LastRefresh string + Metadata map[string]any + RefreshToken string + Scope string + TokenType string + Type string + func (ts *IFlowTokenStorage) SaveTokenToFile(authFilePath string) error + func (ts *IFlowTokenStorage) SetMetadata(meta map[string]any) + type OAuthResult struct + Code string + Error string + State string + type OAuthServer struct + func NewOAuthServer(port int) *OAuthServer + func (s *OAuthServer) Start() error + func (s *OAuthServer) Stop(ctx context.Context) error + func (s *OAuthServer) WaitForCallback(timeout time.Duration) (*OAuthResult, error) v6.9.2-rc1 Mar 25, 2026