Skip to content

Commit

Permalink
Fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCA committed Jan 6, 2024
1 parent a4d17ac commit 901a785
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions handler/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ func ValidSession(next echo.HandlerFunc) echo.HandlerFunc {
}
}

// ValidSession middleware must be used before RefreshSession
// RefreshSession must only be used after ValidSession middleware
// RefreshSession checks if the session is eligible for the refresh, but doesn't check if it's fully valid
func RefreshSession(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
doRefreshSession(c)
Expand Down Expand Up @@ -79,7 +80,7 @@ func isValidSession(c echo.Context) bool {

// Refreshes a "remember me" session when the user visits web pages (not API)
// Session must be valid before calling this function
// Refresh is performet at most once per 24h
// Refresh is performed at most once per 24h
func doRefreshSession(c echo.Context) {
if util.DisableLogin {
return
Expand Down

0 comments on commit 901a785

Please sign in to comment.