summaryrefslogtreecommitdiffstats
path: root/modules/auth/sso/sspi_windows.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-01-30 16:55:53 +0800
committerGitHub <noreply@github.com>2021-01-30 10:55:53 +0200
commit5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86 (patch)
tree519259f05f7e7fc4dd1df4da521e000ce469567b /modules/auth/sso/sspi_windows.go
parent0e0424c8ecaf6fa3cdd1fcfc154f188014c63dd8 (diff)
downloadgitea-5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86.tar.gz
gitea-5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86.zip
Move middlewares to web/middleware (#14480)
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/auth/sso/sspi_windows.go')
-rw-r--r--modules/auth/sso/sspi_windows.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/auth/sso/sspi_windows.go b/modules/auth/sso/sspi_windows.go
index 10571d67c5..46f7ad9d97 100644
--- a/modules/auth/sso/sspi_windows.go
+++ b/modules/auth/sso/sspi_windows.go
@@ -12,9 +12,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/middlewares"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/templates"
+ "code.gitea.io/gitea/modules/web/middleware"
gouuid "github.com/google/uuid"
"github.com/quasoft/websspi"
@@ -136,7 +136,7 @@ func (s *SSPI) VerifyAuthData(req *http.Request, w http.ResponseWriter, store Da
}
// Make sure requests to API paths and PWA resources do not create a new session
- if !middlewares.IsAPIPath(req) && !isAttachmentDownload(req) {
+ if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) {
handleSignIn(w, req, sess, user)
}
@@ -167,9 +167,9 @@ func (s *SSPI) shouldAuthenticate(req *http.Request) (shouldAuth bool) {
} else if req.FormValue("auth_with_sspi") == "1" {
shouldAuth = true
}
- } else if middlewares.IsInternalPath(req) {
+ } else if middleware.IsInternalPath(req) {
shouldAuth = false
- } else if middlewares.IsAPIPath(req) || isAttachmentDownload(req) {
+ } else if middleware.IsAPIPath(req) || isAttachmentDownload(req) {
shouldAuth = true
}
return