This commit is contained in:
2026-08-15 03:14:56 +08:00
parent a34133cce5
commit 2a3c55bb53
71 changed files with 1445 additions and 1076 deletions
+8 -4
View File
@@ -8,10 +8,10 @@ import (
)
type LoginResult struct {
User map[string]any `json:"user"`
Token string `json:"token"`
ExpiresAt int64 `json:"expiresAt"`
NeedChangePassword bool `json:"needChangePassword"`
User *dto.UserResponse `json:"user"`
Token string `json:"token"`
ExpiresAt int64 `json:"expiresAt"`
NeedChangePassword bool `json:"needChangePassword"`
}
type AuthService struct {
@@ -41,3 +41,7 @@ func (s *AuthService) SwitchAuthority(ctx context.Context, id, authorityID uint)
}
return loginResult(value), nil
}
func (s *AuthService) AuthenticateToken(ctx context.Context, token string) (*biz.TokenAuthentication, error) {
return s.uc.AuthenticateToken(ctx, token)
}