summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-08 21:15:45 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-08 21:15:45 +0100
commitf44cc5178224719fda299dc9f5a65763b1b23f51 (patch)
tree6c8dd9e0c5b36e3acb2011f0ef69ac689c30000c /vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go
parentMerge pull request #195 from NyaaaWhatsUpDoc/update/bun-library (diff)
parentMerge remote-tracking branch 'upstream/main' into update/oauth-library (diff)
downloadgotosocial-f44cc5178224719fda299dc9f5a65763b1b23f51.tar.xz
Merge pull request #196 from NyaaaWhatsUpDoc/update/oauth-library
Update oauth library -> v4.3.2-SSB
Diffstat (limited to 'vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go')
-rw-r--r--vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go b/vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go
index 5a34f1a94..c871b1924 100644
--- a/vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go
+++ b/vendor/github.com/superseriousbusiness/oauth2/v4/server/handler.go
@@ -16,7 +16,7 @@ type (
ClientAuthorizedHandler func(clientID string, grant oauth2.GrantType) (allowed bool, err error)
// ClientScopeHandler check the client allows to use scope
- ClientScopeHandler func(clientID, scope string) (allowed bool, err error)
+ ClientScopeHandler func(tgr *oauth2.TokenGenerateRequest) (allowed bool, err error)
// UserAuthorizationHandler get user id from request authorization
UserAuthorizationHandler func(w http.ResponseWriter, r *http.Request) (userID string, err error)
@@ -25,9 +25,9 @@ type (
PasswordAuthorizationHandler func(username, password string) (userID string, err error)
// RefreshingScopeHandler check the scope of the refreshing token
- RefreshingScopeHandler func(newScope, oldScope string) (allowed bool, err error)
+ RefreshingScopeHandler func(tgr *oauth2.TokenGenerateRequest, oldScope string) (allowed bool, err error)
- //RefreshingValidationHandler check if refresh_token is still valid. eg no revocation or other
+ // RefreshingValidationHandler check if refresh_token is still valid. eg no revocation or other
RefreshingValidationHandler func(ti oauth2.TokenInfo) (allowed bool, err error)
// ResponseErrorHandler response error handing