authctx

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActorFromContext

func ActorFromContext(ctx context.Context) (*auth.ActorContext, bool)

ActorFromContext is a thin wrapper around go-auth helpers so callers do not need to import auth directly when they only need the actor payload.

func ActorFromRouterContext

func ActorFromRouterContext(ctx router.Context) (*auth.ActorContext, bool)

ActorFromRouterContext extracts the actor payload from router contexts using go-auth helpers.

func ActorRefFromActorContext

func ActorRefFromActorContext(actor *auth.ActorContext) (types.ActorRef, error)

ActorRefFromActorContext converts the auth middleware payload into the smaller ActorRef consumed across go-users.

func ResolveActor

func ResolveActor(ctx context.Context) (types.ActorRef, *auth.ActorContext, error)

ResolveActor returns both the actor reference used by go-users commands and the richer auth.ActorContext payload for transports that need tenant/org metadata.

func ResolveActorContext

func ResolveActorContext(ctx context.Context) (*auth.ActorContext, error)

ResolveActorContext returns the actor metadata stored by go-auth middleware or rebuilds it from JWT claims when the ContextEnricher hook was not configured.

func ResolveActorContextFromRouter

func ResolveActorContextFromRouter(ctx router.Context) (*auth.ActorContext, error)

ResolveActorContextFromRouter mirrors ResolveActorContext for router transports where middleware stores actor metadata directly in the router context.

func ScopeFromActorContext

func ScopeFromActorContext(actor *auth.ActorContext) types.ScopeFilter

ScopeFromActorContext builds a ScopeFilter using the normalized tenant/org identifiers stored by go-auth middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL