auth package refactoring

moving middleware/hooks away from package
exposing public struct UserToken accessible from other packages
fix debug log lines so the same order and naming are used
This commit is contained in:
Marcus Efraimsson
2019-02-05 00:10:56 +01:00
parent 57457e2aa4
commit 7cd3cd6cd4
9 changed files with 695 additions and 684 deletions
-25
View File
@@ -1,25 +0,0 @@
package auth
import (
"errors"
)
// Typed errors
var (
ErrAuthTokenNotFound = errors.New("User auth token not found")
)
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:"-"`
}