Versions in this module Expand all Collapse all v0 v0.31.0 Apr 22, 2026 Changes in this version + var ErrAccessTokenExpired = errors.New("access token expired") + var ErrAccessTokenNotFound = errors.New("no access token found") + var ErrClientCredentialsNotFound = errors.New("client credentials not found") + var ErrInvalidAuthType = errors.New("invalid auth type") + var ErrParsingAccessToken = errors.New("failed to parse access token") + var ErrProfileCredentialsNotFound = errors.New("profile missing credentials") + var ErrUnauthenticated = errors.New("not logged in") + func GetFreePort(ctx context.Context) (int, error) + func GetSDKAuthOptionFromProfile(profile *profiles.OtdfctlProfileStore) (sdk.Option, error) + func GetTokenWithClientCreds(ctx context.Context, endpoint string, clientID string, clientSecret string, ...) (*oauth2.Token, error) + func GetTokenWithProfile(ctx context.Context, profile *profiles.OtdfctlProfileStore) (*oauth2.Token, error) + func Login(ctx context.Context, ...) (*oauth2.Token, error) + func LoginWithPKCE(ctx context.Context, host, clientID string, tlsNoVerify bool, port string) (*oauth2.Token, error) + func NormalizeScopes(scopes []string) []string + func RevokeAccessToken(ctx context.Context, endpoint, clientID, refreshToken string, tlsNoVerify bool) error + func ValidateProfileAuthCredentials(ctx context.Context, profile *profiles.OtdfctlProfileStore) error + type ClientCredentials struct + ClientID string + ClientSecret string + Scopes []string + func GetClientCredsFromFile(filepath string) (ClientCredentials, error) + func GetClientCredsFromJSON(credsJSON []byte) (ClientCredentials, error) + type JWTClaims struct + Expiration int64 + func ParseClaimsJWT(accessToken string) (JWTClaims, error)