Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptoRandomBytes ¶
CryptoRandomBytes generates cryptographically secure random bytes
func CryptoRandomString ¶
CryptoRandomString generates a random hex string for salts
func GetIPFromContext ¶
GetIPFromContext extracts the client IP address from the context
func GetUsernameFromContext ¶
GetUsernameFromContext extracts the username from the user object in context
func HashToken ¶
HashToken returns PBKDF2 hash of token with salt Parameters match Gitea's implementation for security consistency
func IPMiddleware ¶
func IPMiddleware() gin.HandlerFunc
IPMiddleware extracts client IP and stores it in the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.