summaryrefslogtreecommitdiff
path: root/internal/api/client/auth/token.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/auth/token.go')
-rw-r--r--internal/api/client/auth/token.go4
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 {