master: add jwt expires_after_seconds

This commit is contained in:
Chris Lu
2019-05-04 08:42:25 -07:00
parent bd8af92b54
commit 25941e0500
7 changed files with 21 additions and 14 deletions

View File

@@ -110,7 +110,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
}
func (ms *MasterServer) maybeAddJwtAuthorization(w http.ResponseWriter, fileId string) {
encodedJwt := security.GenJwt(ms.guard.SigningKey, fileId)
encodedJwt := security.GenJwt(ms.guard.SigningKey, ms.guard.ExpiresAfterSec, fileId)
if encodedJwt == "" {
return
}