From d1c55d5aa7f4877c4e495a4d726810738e9b2e26 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sun, 17 Mar 2024 21:55:06 +0800 Subject: [PATCH] fix: improve error message in token_cas.go --- object/token_cas.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/object/token_cas.go b/object/token_cas.go index 866ba9b4..b5ea9d3d 100644 --- a/object/token_cas.go +++ b/object/token_cas.go @@ -261,7 +261,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error ok, _, service, userId := GetCasTokenByTicket(ticket) if !ok { - return "", "", fmt.Errorf("ticket %s found", ticket) + return "", "", fmt.Errorf("the CAS token for ticket %s is not found", ticket) } user, err := GetUser(userId) @@ -270,7 +270,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error } if user == nil { - return "", "", fmt.Errorf("user %s found", userId) + return "", "", fmt.Errorf("the user %s is not found", userId) } application, err := GetApplicationByUser(user) @@ -279,7 +279,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error } if application == nil { - return "", "", fmt.Errorf("application for user %s found", userId) + return "", "", fmt.Errorf("the application for user %s is not found", userId) } samlResponse, err := NewSamlResponse11(user, request.RequestID, host)