package
0.0.0-20241229200848-86990eb7e39b
Repository: https://github.com/seanhuebl/chirpy.git
Documentation: pkg.go.dev

# Functions

CheckPasswordHash compares a hashed password with a plain-text password.
GetAPIKey extracts the API key from the Authorization header of an HTTP request.
GetBearerToken extracts the Bearer token from the Authorization header of an HTTP request.
HashPassword hashes the provided password using bcrypt.
MakeJWT creates a JWT for the given user ID with a specified secret and expiration duration.
MakeRefreshToken generates a random refresh token as a hex-encoded string.
ValidateJWT validates the given JWT using the specified secret.