Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateHash ¶
CalculateHash returns hashed string based on password
func CheckPasswordHash ¶
CheckPasswordHash returns true if hashed password is OK
Types ¶
type AuthHelper ¶
type AuthHelper struct{}
AuthHelper used to access it as class
func (*AuthHelper) Decode ¶
func (ah *AuthHelper) Decode(jwtToken string) (map[string]string, error)
Decode decodes JWT w/o validation
func (*AuthHelper) GenerateJwt ¶
GenerateJwt returns encoded JWT string
func (*AuthHelper) ValidateHeader ¶
func (ah *AuthHelper) ValidateHeader(header string) (*models.User, error)
ValidateHeader returns error in case HTTP header does not contain valid JWT
Click to show internal directories.
Click to hide internal directories.