33 lines
483 B
Go
33 lines
483 B
Go
package auth2
|
||
|
||
import (
|
||
"time"
|
||
|
||
"git.rosy.net.cn/jx-callback/business/model"
|
||
)
|
||
|
||
const (
|
||
TokenTypeNone = 0
|
||
TokenTypeNormal = 1
|
||
TokenTypeOnlyAuth = 2
|
||
)
|
||
|
||
type AuthInfo struct {
|
||
IUser
|
||
AuthBindInfo *model.AuthBind
|
||
|
||
LoginTime time.Time
|
||
ExpiresIn int64
|
||
Token string
|
||
TokenType int // TOKEN类型,
|
||
UserData interface{}
|
||
}
|
||
|
||
func (a *AuthInfo) GetAuthID() string {
|
||
return a.AuthBindInfo.AuthID
|
||
}
|
||
|
||
func (a *AuthInfo) GetAuthType() string {
|
||
return a.AuthBindInfo.Type
|
||
}
|