Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth( httpRequest *http.Request, username, password, applicationName string, jwtLifetimeDuration time.Duration, jwtSigningMethod *jwt.SigningMethodHMAC, jwtSignatureKey []byte, ) (string, virest.Error, bool)
Authenticate and generate JWT token for user with basic auth. After authentication succeed, new JWT will be generated with issuer name from argument 'applicationName' and valid until argument 'jwtLifetimeDuration'. This function use hashing PBKDF2 for basic auth. PBKDF2 hashing Specification:
- Key length = 64 bits
- Pseudo-random function = SHA512
- Salt and iteration will be respected from sender
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.