extract auth token interface and remove auth token from context

This commit is contained in:
Marcus Efraimsson
2019-01-22 12:00:33 +01:00
parent 366e356e08
commit 4096449aec
8 changed files with 56 additions and 71 deletions
-16
View File
@@ -10,25 +10,9 @@ import (
"gopkg.in/macaron.v1"
)
type UserAuthToken struct {
Id int64
UserId int64
AuthToken string
PrevAuthToken string
UserAgent string
ClientIp string
AuthTokenSeen bool
SeenAt int64
RotatedAt int64
CreatedAt int64
UpdatedAt int64
UnhashedToken string `xorm:"-"`
}
type ReqContext struct {
*macaron.Context
*SignedInUser
UserToken *UserAuthToken
Session session.SessionStore