Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
id
go-sso
Commits
10aba630
Commit
10aba630
authored
Dec 20, 2019
by
ale
Browse files
Add a grace time to the keystore TTL
Just to cover edge cases when sessions are about to expire.
parent
c31919d0
Changes
1
Show whitespace changes
Inline
Side-by-side
server/http.go
View file @
10aba630
...
@@ -203,7 +203,9 @@ func (h *Server) maybeUnlockKeystore(ctx context.Context, username, password str
...
@@ -203,7 +203,9 @@ func (h *Server) maybeUnlockKeystore(ctx context.Context, username, password str
}
}
shard
=
userinfo
.
Shard
shard
=
userinfo
.
Shard
}
}
return
true
,
h
.
keystore
.
Open
(
ctx
,
shard
,
username
,
password
,
h
.
authSessionLifetime
)
// Add a 'grace time' of 30 minutes to the key ttl.
ttl
:=
h
.
authSessionLifetime
+
1800
return
true
,
h
.
keystore
.
Open
(
ctx
,
shard
,
username
,
password
,
ttl
)
}
}
// Callback called by the login handler whenever a user successfully
// Callback called by the login handler whenever a user successfully
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment