mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
fix: improve error message in token_cas.go
This commit is contained in:
parent
c8aa35c9c6
commit
d1c55d5aa7
@ -261,7 +261,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
|||||||
|
|
||||||
ok, _, service, userId := GetCasTokenByTicket(ticket)
|
ok, _, service, userId := GetCasTokenByTicket(ticket)
|
||||||
if !ok {
|
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)
|
user, err := GetUser(userId)
|
||||||
@ -270,7 +270,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
|||||||
}
|
}
|
||||||
|
|
||||||
if user == nil {
|
if user == nil {
|
||||||
return "", "", fmt.Errorf("user %s found", userId)
|
return "", "", fmt.Errorf("the user %s is not found", userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
application, err := GetApplicationByUser(user)
|
application, err := GetApplicationByUser(user)
|
||||||
@ -279,7 +279,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
|||||||
}
|
}
|
||||||
|
|
||||||
if application == nil {
|
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)
|
samlResponse, err := NewSamlResponse11(user, request.RequestID, host)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user