summaryrefslogtreecommitdiff
path: root/internal/apimodule/auth/middleware.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
commitdafc3b5b92865b97be48456e02ad235f4c79cf4e (patch)
tree0f97edf4377f406df321054d26e731ff5dcc6667 /internal/apimodule/auth/middleware.go
parentApi/v1/statuses (#11) (diff)
downloadgotosocial-dafc3b5b92865b97be48456e02ad235f4c79cf4e.tar.xz
linting + organizing
Diffstat (limited to 'internal/apimodule/auth/middleware.go')
-rw-r--r--internal/apimodule/auth/middleware.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/apimodule/auth/middleware.go b/internal/apimodule/auth/middleware.go
index 4ca1f47a2..1d9a85993 100644
--- a/internal/apimodule/auth/middleware.go
+++ b/internal/apimodule/auth/middleware.go
@@ -24,12 +24,12 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/oauth"
)
-// oauthTokenMiddleware checks if the client has presented a valid oauth Bearer token.
+// OauthTokenMiddleware checks if the client has presented a valid oauth Bearer token.
// If so, it will check the User that the token belongs to, and set that in the context of
// the request. Then, it will look up the account for that user, and set that in the request too.
// If user or account can't be found, then the handler won't *fail*, in case the server wants to allow
// public requests that don't have a Bearer token set (eg., for public instance information and so on).
-func (m *authModule) oauthTokenMiddleware(c *gin.Context) {
+func (m *Module) OauthTokenMiddleware(c *gin.Context) {
l := m.log.WithField("func", "ValidatePassword")
l.Trace("entering OauthTokenMiddleware")