Versions in this module Expand all Collapse all v0 v0.2.0 Apr 10, 2026 Changes in this version type Context + func (c Context) Issuer() string v0.1.0 Mar 20, 2026 Changes in this version + func WithContext(ctx context.Context, id Context) context.Context + type Context struct + func FromContext(ctx context.Context) (Context, bool) + func MustFromContext(ctx context.Context) Context + func New(tenantID, workspaceID, principalID string, principalType PrincipalType, ...) (Context, error) + func (c Context) HasAnyRole(roles ...string) bool + func (c Context) HasRole(role string) bool + func (c Context) IsService() bool + func (c Context) IsUser() bool + func (c Context) LogValue() map[string]any + func (c Context) PrincipalID() string + func (c Context) PrincipalType() PrincipalType + func (c Context) Roles() []string + func (c Context) String() string + func (c Context) TenantID() string + func (c Context) WorkspaceID() string + type PrincipalType string + const PrincipalService + const PrincipalUser