Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type OwnershipVerificationMode ¶
type OwnershipVerificationMode string
OwnershipVerificationMode controls what the portal shows the user for ownership verification.
const ( // OwnershipVerificationModeDNSChallenge instructs the portal to show a DNS TXT record that // the user must add to prove ownership. When the user runs Setup Check, the portal performs // a live DNS lookup against _certmatic-verify.{hostname} and automatically sets // ownership_verified=true on the domain if the record matches. OwnershipVerificationModeDNSChallenge OwnershipVerificationMode = "dns_challenge" // OwnershipVerificationModeProviderManaged indicates that an external SaaS/provider controls // verification. The portal shows a configurable "Verify Ownership" button linking to the // provider dashboard. The provider (or admin) calls ownership_verified=true on the admin API. OwnershipVerificationModeProviderManaged OwnershipVerificationMode = "provider_managed" )
type Session ¶
type Session struct {
SessionID string
Hostname string
ExpiresAt time.Time
BackURL string
BackText string
OwnershipVerificationMode OwnershipVerificationMode
VerifyOwnershipURL string
VerifyOwnershipText string
}
Session represents an authenticated portal session scoped to a single hostname.
type SessionStore ¶
type SessionStore interface {
// StoreSession persists a newly created session.
StoreSession(session *Session) error
// RedeemToken validates an HMAC-signed token (one-time use) and returns the stored session.
RedeemToken(signingKey []byte, token string) (*Session, error)
// GetSession looks up an active session by session ID.
GetSession(sessionID string) (*Session, error)
// ClearExpired removes all sessions that have passed their expiry time.
ClearExpired() error
}
SessionStore manages portal sessions.
Click to show internal directories.
Click to hide internal directories.