diff options
author | 2021-09-08 21:15:45 +0100 | |
---|---|---|
committer | 2021-09-08 21:15:45 +0100 | |
commit | f44cc5178224719fda299dc9f5a65763b1b23f51 (patch) | |
tree | 6c8dd9e0c5b36e3acb2011f0ef69ac689c30000c /internal/api/client/auth/token.go | |
parent | Merge pull request #195 from NyaaaWhatsUpDoc/update/bun-library (diff) | |
parent | Merge remote-tracking branch 'upstream/main' into update/oauth-library (diff) | |
download | gotosocial-f44cc5178224719fda299dc9f5a65763b1b23f51.tar.xz |
Merge pull request #196 from NyaaaWhatsUpDoc/update/oauth-library
Update oauth library -> v4.3.2-SSB
Diffstat (limited to 'internal/api/client/auth/token.go')
-rw-r--r-- | internal/api/client/auth/token.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/api/client/auth/token.go b/internal/api/client/auth/token.go index 798a88d19..7e590aa1f 100644 --- a/internal/api/client/auth/token.go +++ b/internal/api/client/auth/token.go @@ -31,6 +31,7 @@ type tokenBody struct { Code *string `form:"code" json:"code" xml:"code"` GrantType *string `form:"grant_type" json:"grant_type" xml:"grant_type"` RedirectURI *string `form:"redirect_uri" json:"redirect_uri" xml:"redirect_uri"` + Scope *string `form:"scope" json:"scope" xml:"scope"` } // TokenPOSTHandler should be served as a POST at https://example.org/oauth/token @@ -58,6 +59,9 @@ func (m *Module) TokenPOSTHandler(c *gin.Context) { if form.RedirectURI != nil { c.Request.Form.Set("redirect_uri", *form.RedirectURI) } + if form.Scope != nil { + c.Request.Form.Set("scope", *form.Scope) + } } if err := m.server.HandleTokenRequest(c.Writer, c.Request); err != nil { |