fix now
This commit is contained in:
parent
1aa1296732
commit
25c3e9421f
1 changed files with 3 additions and 2 deletions
|
@ -103,11 +103,12 @@ const defaultExpiration = 2 * time.Hour
|
|||
|
||||
func (a *Authenticator) NewToken(r *http.Request, user provider.ProviderUser, f *Flow) TokenID {
|
||||
id := TokenID(genUUID())
|
||||
now := time.Now()
|
||||
|
||||
t := &Token{
|
||||
ID: id,
|
||||
Ctime: time.Now(),
|
||||
Expires: time.Now().Add(defaultExpiration),
|
||||
Ctime: now,
|
||||
Expires: now.Add(defaultExpiration),
|
||||
Addr: r.RemoteAddr,
|
||||
|
||||
user: user,
|
||||
|
|
Loading…
Reference in a new issue