Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimSingleUse ¶ added in v1.15.14
func ClaimSingleUse(ctx context.Context, client *redis.Client, key string, now time.Time, grace, ttl time.Duration) (bool, error)
ClaimSingleUse reports whether a signed callback payload may be redeemed. It returns false once the payload has already been redeemed outside the retry grace window. The clock is supplied by the caller so the window is evaluated against the same time source as the payload's own freshness check.
func Consume ¶
Consume atomically returns and deletes an OAuth state value. The Lua implementation keeps compatibility with Redis versions older than 6.2.
func PayloadFingerprint ¶ added in v1.15.14
PayloadFingerprint derives the key material for a single-use claim. The signed callback itself is never stored, only its digest.
func ValidateRedirect ¶ added in v1.15.12
ValidateRedirect checks a client-supplied OAuth redirect target before it is stored as state and later used as a browser redirect. The scheme must be web-safe, and when the administrator configured a site host the redirect must stay on that host or one of its subdomains; an empty site host disables the host pin so existing deployments keep working.
Types ¶
This section is empty.