Skip to content

Commit

Permalink
test: fix flaky equal check
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Sep 7, 2022
1 parent 60bab08 commit 1100aba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/handler.go
Expand Up @@ -699,8 +699,8 @@ func (h *Handler) ValidDynamicAuth(r *http.Request, ps httprouter.Params) (fosit
WithReason("The requested OAuth 2.0 client does not exist or you provided incorrect credentials.").WithDebug("The OAuth2 Client does not have a registration access token."))
}

token := fosite.AccessTokenFromRequest(r)
if err := h.r.OAuth2HMACStrategy().Enigma.Validate(r.Context(), strings.TrimPrefix(token, "ory_at_")); err != nil {
token := strings.TrimPrefix(fosite.AccessTokenFromRequest(r), "ory_at_")
if err := h.r.OAuth2HMACStrategy().Enigma.Validate(r.Context(), token); err != nil {
return nil, herodot.ErrUnauthorized.
WithTrace(err).
WithReason("The requested OAuth 2.0 client does not exist or you provided incorrect credentials.").WithDebug(err.Error())
Expand Down
2 changes: 2 additions & 0 deletions oauth2/oauth2_auth_code_test.go
Expand Up @@ -35,6 +35,8 @@ import (
"testing"
"time"

"github.com/ory/x/assertx"

"github.com/pborman/uuid"
"github.com/tidwall/gjson"

Expand Down

0 comments on commit 1100aba

Please sign in to comment.