Documentation ¶
Overview ¶
Package auth determines and asserts client permissions to access and modify server resources.
Index ¶
- Variables
- func BcryptCompare(password string, hash []byte) error
- func BcryptHash(password string, rounds int) ([]byte, error)
- func GetIP(req *http.Request) string
- func IsBoard(board string) bool
- func IsNonMetaBoard(board string) bool
- func RandomID(length int) (string, error)
- type Ident
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // IsReverseProxied specifies, if the server is deployed behind a reverse // proxy. IsReverseProxied bool // ReverseProxyIP specifies the IP of a non-localost reverse proxy. Used for // filtering in XFF IP determination. ReverseProxyIP string )
Functions ¶
func BcryptCompare ¶
BcryptCompare compares a bcrypt hash with a user-suplied string
func BcryptHash ¶
BcryptHash generates a bcrypt hash from the passed string
func IsNonMetaBoard ¶
IsNonMetaBoard returns wheather a valid board is a classic board and not some other path that emulates a board
Types ¶
type Ident ¶
Ident is used to verify a client's access and write permissions. Contains its IP and logged in user data, if any.
func LookUpIdent ¶
LookUpIdent determine access rights of an IP
Click to show internal directories.
Click to hide internal directories.