Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DBPool *db.Pool
This package scoped globals don't look nice What is a better way of doing this?
Functions ¶
Types ¶
type Credentials ¶
func (*Credentials) Validate ¶
For security remap fields (for example imagine the target struct supports an isAdmin field which could cause privilege scalation) not required for read-only operations but using as example
cleanLogin := sanitizedLogin{ Username: login.Username, Password: login.Password, isAdmin: false, }
Commenting out for now
type sanitizedLogin struct { Username string Password string isAdmin bool }
@TODO generate random keys for JWT signing for each login
type JwtCustomClaims ¶
type JwtCustomClaims struct { User db.User jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.