Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTService ¶
type JWTService interface { GenerateToken(name string, admin bool) string ValidateToken(tokenString string) (*jwt.Token, error) }
func NewJWTService ¶
func NewJWTService(issuer string, secret string, expirationTime time.Duration) JWTService
NewJWTService creates a JWTService that generates a token. The issuer, secret and the expiration time (hours) are being passed as parameters.
Click to show internal directories.
Click to hide internal directories.