Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerAuthMiddleware ¶
BearerAuthMiddleware creates middleware that validates Bearer token authentication If expectedToken is empty, the middleware allows all requests (backwards compatibility)
func GenerateToken ¶
GenerateToken generates a cryptographically secure random token suitable for use as an API bearer token. The token is 32 bytes of random data encoded as base64url (resulting in ~44 characters).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.