Documentation ¶
Index ¶
- Constants
- func BcryptCheck(hashedPassword, password []byte) bool
- func BcryptConvertTo(username, password string) (string, error)
- func BearerToken(jwtToken []byte) string
- func CheckTokenExpiry(expiry interface{}) bool
- func ComposeBcryptPassword(username, password string) []byte
- func CreateToken(mapClaims jwt.MapClaims, secret []byte) (string, error)
- func GetAuthSecret() []byte
- func KeyFunction(token *jwt.Token) (interface{}, error)
- func ParseBearer(receivedToken string) string
- func VerifyToken(authToken string, keyFunction func(token *jwt.Token) (interface{}, error)) (string, bool)
Constants ¶
View Source
const (
/**
Should outsorced to utils for security purpose but for now this would do
*/
AUTH_TOKEN_SECRET = "=kVsu2{G9'{'K<>d"
)
View Source
const SALT = "s+rS?:wk&FeXN88EW"
Variables ¶
This section is empty.
Functions ¶
func BcryptCheck ¶
func BcryptConvertTo ¶
func BearerToken ¶
func CheckTokenExpiry ¶
func CheckTokenExpiry(expiry interface{}) bool
func ComposeBcryptPassword ¶
func CreateToken ¶
func GetAuthSecret ¶
func GetAuthSecret() []byte
func KeyFunction ¶
func KeyFunction(token *jwt.Token) (interface{}, error)
func ParseBearer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.