Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
Authenticator exposes a function for authenticating requests.
func (Authenticator) Authenticate ¶
Authenticate checks that a token exists and is valid. It stores the user metadata in the returned context and removes the token from the context.
type UserMetadata ¶
type UserMetadata struct {
ID string
}
UserMetadata contains metadata about a user.
func GetUserMetadata ¶
func GetUserMetadata(ctx context.Context) (*UserMetadata, bool)
GetUserMetadata can be used to extract user metadata stored in a context.
Click to show internal directories.
Click to hide internal directories.