Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IJWTPackage ¶
type IJWTPackage interface { CreateToken(email string) (string, error) ValidateToken(token string) (string, error) }
func NewJWTPackage ¶
func NewJWTPackage(SecretKey string) IJWTPackage
type JWTService ¶
type JWTService struct {
SecretKey string
}
func (JWTService) CreateToken ¶
func (J JWTService) CreateToken(email string) (string, error)
func (JWTService) ValidateToken ¶
func (J JWTService) ValidateToken(accessToken string) (string, error)
Click to show internal directories.
Click to hide internal directories.