feat: Longer lived api keys for cli (#1935)

* feat: Longer lived api keys for cli
* feat: Refresh tokens based on their lifetime set in the db
* test: Add unit test for refreshing
This commit is contained in:
Steven Masley
2022-06-01 14:58:55 -05:00
committed by GitHub
parent bb400a4e82
commit 913c0f5e7f
10 changed files with 147 additions and 8 deletions
+1
View File
@@ -305,6 +305,7 @@ type APIKey struct {
OAuthRefreshToken string `db:"oauth_refresh_token" json:"oauth_refresh_token"`
OAuthIDToken string `db:"oauth_id_token" json:"oauth_id_token"`
OAuthExpiry time.Time `db:"oauth_expiry" json:"oauth_expiry"`
LifetimeSeconds int64 `db:"lifetime_seconds" json:"lifetime_seconds"`
}
type AuditLog struct {