Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtManager ¶
type JwtManager struct {
// contains filtered or unexported fields
}
func NewJWTManager ¶
func NewJWTManager(secretKey string, tokenDuration time.Duration) *JwtManager
func (*JwtManager) Verify ¶
func (m *JwtManager) Verify(accessToken string) (*UserClaims, error)
type User ¶
type User struct { Id uint `json:"id"` Name string `json:"name"` FamilyName string `json:"family_name"` Password string `json:"-"` Email string `json:"email"` Username string `json:"username"` IsActivated bool `json:"is_activated"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"-"` }
func CreateNewUser ¶
func (*User) CheckPassword ¶
func (*User) SetPassword ¶
type UserClaims ¶
type UserClaims struct { jwt.StandardClaims Id uint `json:"id"` }
Click to show internal directories.
Click to hide internal directories.