mirror of
https://github.com/harness/drone.git
synced 2025-05-09 00:50:07 +00:00
[AUTH] Increase Login/Register Token to 30 Day Lifetime (#510)
This commit is contained in:
parent
e88a518da4
commit
b93496fd99
@ -18,7 +18,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
userTokenLifeTime time.Duration = 24 * time.Hour // 1 day.
|
// userSessionTokenLifeTime is the duration a login / register token is valid.
|
||||||
|
// NOTE: Users can list / delete session tokens via rest API if they want to cleanup earlier.
|
||||||
|
userSessionTokenLifeTime time.Duration = 30 * 24 * time.Hour // 30 days.
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateUserSession(
|
func CreateUserSession(
|
||||||
@ -35,7 +37,7 @@ func CreateUserSession(
|
|||||||
principal,
|
principal,
|
||||||
principal,
|
principal,
|
||||||
uid,
|
uid,
|
||||||
ptr.Duration(userTokenLifeTime),
|
ptr.Duration(userSessionTokenLifeTime),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user