优化
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user