summaryrefslogtreecommitdiffstats
path: root/modules/middleware/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r--modules/middleware/auth.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 743b982976..cf7bee4d22 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -8,6 +8,7 @@ import (
"github.com/codegangsta/martini"
)
+// SignInRequire requires user to sign in.
func SignInRequire(redirect bool) martini.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
@@ -19,6 +20,7 @@ func SignInRequire(redirect bool) martini.Handler {
}
}
+// SignOutRequire requires user to sign out.
func SignOutRequire() martini.Handler {
return func(ctx *Context) {
if ctx.IsSigned {