Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct {
Name string `json:"name"`
UserId string `json:"userId"`
jwt.StandardClaims
}
func NewClaims ¶
func NewClaims(username, encryptedPassword, userId string) CustomClaims
type JWT ¶
type JWT struct {
SigningKey []byte
}
func NewJWToken ¶
func NewJWToken() *JWT
func (*JWT) CreateJWToken ¶
func (j *JWT) CreateJWToken(claims CustomClaims) (string, error)
func (*JWT) ParesJWToken ¶
func (j *JWT) ParesJWToken(tokenString string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.