diff options
author | 2024-04-15 14:22:21 +0100 | |
---|---|---|
committer | 2024-04-15 14:22:21 +0100 | |
commit | f79d50b9b26590b6d2468aeb41f0846272e08d1a (patch) | |
tree | 196b9bfaf8ad6fce782c2130633cfb5c97cbd31a /internal/oauth/errors.go | |
parent | [chore] Turn `accounts-registration-open` false by default (#2839) (diff) | |
download | gotosocial-f79d50b9b26590b6d2468aeb41f0846272e08d1a.tar.xz |
[performance] cached oauth database types (#2838)
* update token + client code to use struct caches
* add code comments
* slight tweak to default mem ratios
* fix envparsing
* add appropriate invalidate hooks
* update the tokenstore sweeping function to rely on caches
* update to use PutClient()
* add ClientID to list of token struct indices
Diffstat (limited to 'internal/oauth/errors.go')
-rw-r--r-- | internal/oauth/errors.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/oauth/errors.go b/internal/oauth/errors.go index dd61be28c..b16143e5c 100644 --- a/internal/oauth/errors.go +++ b/internal/oauth/errors.go @@ -19,7 +19,5 @@ package oauth import "github.com/superseriousbusiness/oauth2/v4/errors" -// InvalidRequest returns an oauth spec compliant 'invalid_request' error. -func InvalidRequest() error { - return errors.New("invalid_request") -} +// ErrInvalidRequest is an oauth spec compliant 'invalid_request' error. +var ErrInvalidRequest = errors.New("invalid_request") |