Documentation
¶
Overview ¶
Package middleware holds the request-context helpers handlers use to find the caller. Authentication itself is iam's httpauth (wired in internal/auth and internal/server); this package only translates its subject into LibraryZ's numeric user id.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsModerator ¶
IsModerator reports whether the user currently holds the "moderator" role, read from the database (not the access token), for checks made inside services. An unknown user is simply not a moderator.
func ParseSubjectID ¶
ParseSubjectID is the inverse of SubjectID. It rejects anything that isn't a canonical, non-zero decimal (no sign, no leading zeros).
Types ¶
This section is empty.