MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / DeleteAdminCookie

Function DeleteAdminCookie

internal/cookie/admin_cookie.go:55–59  ·  view source on GitHub ↗

DeleteAdminCookie sets the response cookie to empty

(gc *gin.Context, adminCookieSecure bool)

Source from the content-addressed store, hash-verified

53
54// DeleteAdminCookie sets the response cookie to empty
55func DeleteAdminCookie(gc *gin.Context, adminCookieSecure bool) {
56 c := BuildDeleteAdminCookie(parsers.GetHost(gc), adminCookieSecure)
57 gc.SetSameSite(c.SameSite)
58 gc.SetCookie(c.Name, c.Value, c.MaxAge, c.Path, c.Domain, c.Secure, c.HttpOnly)
59}
60
61// BuildDeleteAdminCookie returns a zero-value, expired admin cookie that causes
62// browsers to delete the admin session cookie. Transport-agnostic mirror of

Callers

nothing calls this directly

Calls 2

GetHostFunction · 0.92
BuildDeleteAdminCookieFunction · 0.85

Tested by

no test coverage detected