Documentation
¶
Index ¶
- func ActorFromContext(ctx context.Context) (*auth.ActorContext, bool)
- func ActorFromRouterContext(ctx router.Context) (*auth.ActorContext, bool)
- func ActorRefFromActorContext(actor *auth.ActorContext) (types.ActorRef, error)
- func ResolveActor(ctx context.Context) (types.ActorRef, *auth.ActorContext, error)
- func ResolveActorContext(ctx context.Context) (*auth.ActorContext, error)
- func ResolveActorContextFromRouter(ctx router.Context) (*auth.ActorContext, error)
- func ScopeFromActorContext(actor *auth.ActorContext) types.ScopeFilter
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 ¶
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.