Documentation ¶
Overview ¶
Package auth contains helpers for managing identities within the GraphQL API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAuthenticated = errors.New("not authenticated or read-only")
ErrNotAuthenticated is returned to the client if the user requests an action requiring authentication, and they are not authenticated.
Functions ¶
func CtxWithUser ¶
CtxWithUser attaches an Identity to a context.
func UserFromCtx ¶
UserFromCtx retrieves an IdentityCache from the context. If there is no identity in the context, ErrNotAuthenticated is returned. If an error occurs while resolving the identity (e.g. I/O error), then it will be returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.