Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { UserID int `json:"user_id"` Username string `json:"username"` jwt.StandardClaims }
Claims represents JWT claims
type RefreshClaims ¶
type RefreshClaims struct { UserID int `json:"user_id"` TokenID string `json:"token_id"` jwt.StandardClaims }
RefreshClaims represents JWT refresh token claims
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles user authentication
func NewService ¶
func NewService( cfg *config.Config, log *logger.Logger, userRepository models.UserRepository, ) *Service
NewService creates a new auth service
func (*Service) RefreshToken ¶
RefreshToken refreshes an access token
Click to show internal directories.
Click to hide internal directories.