Documentation
¶
Overview ¶
Package auth is the public SDK facade over Harbor's internal/tools/auth package — the tool-side OAuth completion leg: a plain http.Handler that exchanges the provider redirect and resumes the parked pause (RFC §3.6, §6.3; D-204/D-206; Phase 111b/D-199). Alias-based re-exports only: no behavior lives here. Added in Phase 112b: the steer-and-resume-a-run recipe's headless path mounts the callback handler over `assemble.Stack.OAuthProviders`, which 112a's inventory left unreachable. Provider construction (BuildProviders), the token store, and the sealer are deliberately private — the assembly builds providers from harbor.yaml.
Index ¶
Constants ¶
const CallbackPath = internal.CallbackPath
CallbackPath is the canonical callback route path.
const CallbackRoutePattern = internal.CallbackRoutePattern
CallbackRoutePattern is the canonical mux pattern ("GET /v1/tools/oauth/callback") for mounting CallbackHandler.
Variables ¶
var ( // ErrFlowNotFound — no pending flow for the redirect's state (404). ErrFlowNotFound = internal.ErrFlowNotFound // ErrFlowExpired — the pending flow's TTL elapsed (410). ErrFlowExpired = internal.ErrFlowExpired // ErrStateMismatch — the state nonce did not match (400). ErrStateMismatch = internal.ErrStateMismatch )
Re-exported sentinel errors callers compare via errors.Is.
var CallbackHandler = internal.CallbackHandler
CallbackHandler builds the plain http.Handler that completes (or denies) an OAuth flow and resumes the parked pause.
var WithCallbackLogger = internal.WithCallbackLogger
WithCallbackLogger threads a logger into the handler.
var WithSuccessPage = internal.WithSuccessPage
WithSuccessPage overrides the static "authorization complete" page.
Functions ¶
This section is empty.
Types ¶
type CallbackOption ¶
type CallbackOption = internal.CallbackOption
CallbackOption customises CallbackHandler.
type OAuthProvider ¶
type OAuthProvider = internal.OAuthProvider
OAuthProvider is the per-provider flow surface the callback handler drives (the same values assemble.Stack.OAuthProviders carries).
type PendingFlowInfo ¶
type PendingFlowInfo = internal.PendingFlowInfo
PendingFlowInfo describes one in-flight authorization flow.