aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar Simon Ser <[email protected]> 2019-12-12 16:40:52 +0100
committerLibravatarLibravatar Simon Ser <[email protected]> 2019-12-12 16:40:52 +0100
commitb24cc85fb19b80fe4f67f7b9a88cab7d5af282f3 (patch)
tree71306947050ec8fd49e49aabcd53cfa110678848
parentf07ab5263246d940fbc1d646bcdb5663398378d0 (diff)
downloadalps-b24cc85fb19b80fe4f67f7b9a88cab7d5af282f3.tar.gz
alps-b24cc85fb19b80fe4f67f7b9a88cab7d5af282f3.tar.bz2
alps-b24cc85fb19b80fe4f67f7b9a88cab7d5af282f3.zip
Fix undefined ErrSessionExpired
Fixes: f07ab5263246 ("Add docs")
-rw-r--r--server.go2
-rw-r--r--session.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/server.go b/server.go
index 1c9ca73..171ba53 100644
--- a/server.go
+++ b/server.go
@@ -176,7 +176,7 @@ func New(e *echo.Echo, options *Options) error {
}
ctx.Session, err = ctx.Server.Sessions.get(cookie.Value)
- if err == ErrSessionExpired {
+ if err == errSessionExpired {
ctx.SetSession(nil)
return ctx.Redirect(http.StatusFound, "/login")
} else if err != nil {
diff --git a/session.go b/session.go
index 1f536eb..8fafd57 100644
--- a/session.go
+++ b/session.go
@@ -115,7 +115,7 @@ func (sm *SessionManager) get(token string) (*Session, error) {
session, ok := sm.sessions[token]
if !ok {
- return nil, ErrSessionExpired
+ return nil, errSessionExpired
}
return session, nil
}