Versions in this module Expand all Collapse all v1 v1.1.0-alpha.1 Jan 3, 2025 v1.0.12 Apr 23, 2024 v1.0.11 Apr 1, 2024 v1.0.9 Jun 6, 2022retracted v1.0.8 Jun 6, 2022 v1.0.7 Apr 15, 2022 v1.0.6 Apr 15, 2022 v1.0.5 Feb 18, 2022 v1.0.4 Feb 13, 2022 v1.0.3 Jan 26, 2022 Changes in this version + var ErrorReasonRelogin = errors.New("请重新登陆") + var ErrorReasonServerBusy = errors.New("服务器繁忙") + var ErrorReasonWrongPassword = errors.New("用户或密码错误") + var ExpireTime = 3600 + type AuthConfig struct + Password string + Username string + type AuthDBConfig struct + DBName string + Host string + Password string + Port int + Protocol string + User string + type AuthService struct + Port int + func (s *AuthService) Login(ctx context.Context, username, password string, unexpired bool) (string, error) + func (s *AuthService) Verify(ctx context.Context, token string) (bool, error) + type JWTClaims struct + FullName string + Password string + Permissions []string + UserID int + Username string + type Service interface + Login func(ctx context.Context, username, password string, unexpired bool) (string, error) + Verify func(ctx context.Context, token string) (bool, error) + type ServiceMiddleware func(Service) Service v1.0.3-hotfix1 Feb 9, 2022 v1.0.2-alpha.2 Mar 26, 2021 v1.0.2-alpha.1 Jan 29, 2021 v1.0.1-alpha.3 Dec 10, 2020 v1.0.1-alpha.2 Dec 8, 2020 v1.0.1-alpha.1 Nov 30, 2020