{"modulePath":"github.com/smartcontractkit/cre-cli","version":"v1.42.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package authvalidation\n\n## Functions\n\n```go\nfunc DescribeRetryCause(err error) string\n```\nDescribeRetryCause gives a short user-facing reason; full errors are too long for a spinner line.\n\n## Types\n\n```go\ntype RetryNotifier func(nextAttempt, maxAttempts uint, err error)\n```\nRetryNotifier lets callers show progress, since retries can stretch validation to most of a minute.\n\n```go\ntype ValidationResult struct {\n\tOrgID                string\n\tDerivedWorkflowOwner string\n}\n```\nValidationResult holds the data returned by credential validation.\n\n```go\ntype Validator struct {\n\t// contains filtered or unexported fields\n}\n```\nValidator validates authentication credentials\n\n```go\nfunc NewValidator(creds *credentials.Credentials, environmentSet *environments.EnvironmentSet, log *zerolog.Logger) *Validator\n```\nNewValidator creates a new credential validator\n\n```go\nfunc (v *Validator) CreateServiceContextWithTimeout(parent context.Context) (context.Context, context.CancelFunc)\n```\n\n```go\nfunc (v *Validator) SetRetryNotifier(fn RetryNotifier)\n```\n\n```go\nfunc (v *Validator) SetServiceTimeout(timeout time.Duration)\n```\n\n```go\nfunc (v *Validator) ValidateCredentials(validationCtx context.Context, creds *credentials.Credentials) (*ValidationResult, error)\n```\nValidateCredentials validates the provided credentials by making a lightweight GraphQL query and returns organization info including the derived workflow owner. The GraphQL client automatically handles token refresh if needed.\n\n","path":"github.com/smartcontractkit/cre-cli/internal/authvalidation","name":"authvalidation","synopsis":"","isRedistributable":true}
