Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EXPIRATION_TIME = time.Now().Add(time.Minute * 5).Unix()
View Source
var MY_SECRET = []byte("secretkey")
View Source
var PASSWORD = generatedHashPassword("classification")
View Source
var USERNAME = "triangle"
Functions ¶
This section is empty.
Types ¶
type JwtTokenImpl ¶
type JwtTokenImpl struct{}
func (*JwtTokenImpl) GenerateToken ¶
func (j *JwtTokenImpl) GenerateToken(username string, password string) (*domain.Authentication, error)
func (*JwtTokenImpl) ValidateCredentials ¶
func (j *JwtTokenImpl) ValidateCredentials(username string, password string) bool
func (*JwtTokenImpl) ValidateToken ¶
func (j *JwtTokenImpl) ValidateToken(token string) bool
type UniqueClaims ¶
type UniqueClaims struct { jwt.StandardClaims TokenId string `json:"jti,omitempty"` }
Click to show internal directories.
Click to hide internal directories.