MCPcopy
hub / github.com/ory/hydra / storeErrorsToRevocationError

Function storeErrorsToRevocationError

fosite/handler/oauth2/revocation.go:72–81  ·  view source on GitHub ↗
(err1, err2 error)

Source from the content-addressed store, hash-verified

70}
71
72func storeErrorsToRevocationError(err1, err2 error) error {
73 // both errors are fosite.ErrNotFound and fosite.ErrInactiveToken or nil <=> the token is revoked
74 if (errors.Is(err1, fosite.ErrNotFound) || errors.Is(err1, fosite.ErrInactiveToken) || err1 == nil) &&
75 (errors.Is(err2, fosite.ErrNotFound) || errors.Is(err2, fosite.ErrInactiveToken) || err2 == nil) {
76 return nil
77 }
78
79 // there was an unexpected error => the token may still exist and the client should retry later
80 return errorsx.WithStack(fosite.ErrTemporarilyUnavailable)
81}

Callers 1

RevokeTokenMethod · 0.85

Calls 1

IsMethod · 0.45

Tested by

no test coverage detected