Documentation ¶
Index ¶
- func EnhancedJWT(c context.Context) *authentication.EnhancedJwt
- func Principal(c context.Context) authentication.Principal
- func Trace(ctx context.Context) (uuid.UUID, bool)
- func UserAccountService(ctx context.Context) (authentication.GetUserAccountFromDBFunc, error)
- func WithEnhancedJWT(c context.Context, jwt authentication.EnhancedJwt) context.Context
- func WithLogger(ctx context.Context, logger *zap.Logger) context.Context
- func WithPrincipal(c context.Context, p authentication.Principal) context.Context
- func WithTrace(ctx context.Context) (context.Context, uuid.UUID)
- func WithUserAccountService(ctx context.Context, accountFunction authentication.GetUserAccountFromDBFunc) context.Context
- func ZLogger(ctx context.Context) *zap.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnhancedJWT ¶
func EnhancedJWT(c context.Context) *authentication.EnhancedJwt
EnhancedJWT returns the enhanced EnhancedJWT defaulting to nil if not present.
func Principal ¶
func Principal(c context.Context) authentication.Principal
Principal returns the security principal, defaulting to an Anonymous user if not assigned.
func UserAccountService ¶
func UserAccountService(ctx context.Context) (authentication.GetUserAccountFromDBFunc, error)
UserAccountService returns a GetUserAccountFromDBFunc that is decorating the context
func WithEnhancedJWT ¶
func WithEnhancedJWT(c context.Context, jwt authentication.EnhancedJwt) context.Context
WithEnhancedJWT returns the context decorated with the enhanced jwt
func WithLogger ¶
WithLogger returns a context with the given logger
func WithPrincipal ¶
WithPrincipal decorates the context with the given security principal
func WithUserAccountService ¶
func WithUserAccountService(ctx context.Context, accountFunction authentication.GetUserAccountFromDBFunc) context.Context
WithUserAccountService decorates the context with a GetUserAccountFromDBFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.