MCPcopy Create free account
hub / github.com/PostHog/duckgres / IdentityFromContext

Function IdentityFromContext

controlplane/admin/authz.go:63–70  ·  view source on GitHub ↗

IdentityFromContext returns the resolved Identity, or nil if unauthenticated.

(c *gin.Context)

Source from the content-addressed store, hash-verified

61 Source string `json:"source"`
62}
63
64// IdentityFromContext returns the resolved Identity, or nil if unauthenticated.
65func IdentityFromContext(c *gin.Context) *Identity {
66 v, ok := c.Get(ctxIdentityKey)
67 if !ok {
68 return nil
69 }
70 id, _ := v.(*Identity)
71 return id
72}
73

Callers 9

registerImpersonateAPIFunction · 0.85
upsertOperatorMethod · 0.85
AuditMiddlewareFunction · 0.85
RoleGateFunction · 0.85
RequireAdminFunction · 0.85
meHandlerFunction · 0.85

Calls 1

GetMethod · 0.45