forgejo/services/auth
caicandong 491cc06ffe
Fix the error message when the token is incorrect (#25701)
we refactored `userIDFromToken` for the token parsing part into a new
function `parseToken`. `parseToken` returns the string `token` from
request, and a boolean `ok` representing whether the token exists or
not. So we can distinguish between token non-existence and token
inconsistency in the `verfity` function, thus solving the problem of no
proper error message when the token is inconsistent.
close #24439  
related #22119

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-11 10:04:28 +08:00
..
source Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
auth.go
auth_test.go
basic.go
group.go Fix the error message when the token is incorrect (#25701) 2023-07-11 10:04:28 +08:00
httpsign.go
interface.go
middleware.go
oauth2.go Fix the error message when the token is incorrect (#25701) 2023-07-11 10:04:28 +08:00
reverseproxy.go
session.go
signin.go
source.go
sspi_windows.go
sync.go