# Functions
Authenticate tries to resolve an authentication from the context.
CheckPassword returns whether the raw password matches the hashed password.
GeneratePassword generates random hex passwords of length 8.
MustAuth returns the middleware that redirects to /login if authentication is not found.
NewAdmin creates a new AdminAuth.
PasswordHash hashes a raw string into a hashed password.
Remove removes the authentication cookie.
RemoveAdmin removes the admin cookie session.
Store stores the user as a cookie.
# Constants
AdminKeyEnv is the admin key environment variable to look for.
AdminSessionName is the key name for the admin session cookie.
SessionName is the kjudge session cookie name.