Documentation
¶
Index ¶
- type Authentication
- type JWTAuthentication
- func (auth *JWTAuthentication) CheckPasswordHash(hash, password string) bool
- func (auth *JWTAuthentication) GenerateToken(user domain.User) (string, error)
- func (auth *JWTAuthentication) HashPassword(password string) (string, error)
- func (auth *JWTAuthentication) ValidateToken(tokenString string) (userID int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type JWTAuthentication ¶
type JWTAuthentication struct { }
func NewAuthentication ¶
func NewAuthentication() *JWTAuthentication
func (*JWTAuthentication) CheckPasswordHash ¶
func (auth *JWTAuthentication) CheckPasswordHash(hash, password string) bool
func (*JWTAuthentication) GenerateToken ¶
func (auth *JWTAuthentication) GenerateToken(user domain.User) (string, error)
func (*JWTAuthentication) HashPassword ¶
func (auth *JWTAuthentication) HashPassword(password string) (string, error)
func (*JWTAuthentication) ValidateToken ¶
func (auth *JWTAuthentication) ValidateToken(tokenString string) (userID int64, err error)
Click to show internal directories.
Click to hide internal directories.