Files
jx-callback/business/auth2/auth_info.go
2019-03-01 17:43:17 +08:00

33 lines
483 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}