mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 09:56:31 +02:00
return invalid_grant when authorization request not found
This commit is contained in:
parent
f89babc585
commit
0478d46568
1 changed files with 4 additions and 1 deletions
|
@ -55,10 +55,13 @@ func (srv *Handler) handleAuthorizationCodeToken(w http.ResponseWriter, r *http.
|
|||
}
|
||||
|
||||
authReq, err := srv.storage.GetAuthorizationRequest(ctx, code.Id)
|
||||
if err != nil {
|
||||
if status.Code(err) == codes.NotFound {
|
||||
oauth21.ErrorResponse(w, http.StatusBadRequest, oauth21.InvalidGrant)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
http.Error(w, "internal error", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
err = AuthorizeTokenRequest(req, authReq)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue