mirror of
https://github.com/weloe/token-go.git
synced 2025-10-04 07:06:33 +08:00
feat: add check
This commit is contained in:
@@ -164,6 +164,9 @@ func (e *Enforcer) Login(id string, ctx ctx.Context) (string, error) {
|
||||
|
||||
// LoginByModel login by id and loginModel, return tokenValue and error
|
||||
func (e *Enforcer) LoginByModel(id string, loginModel *model.Login, ctx ctx.Context) (string, error) {
|
||||
if loginModel == nil {
|
||||
return "", errors.New("arg loginModel can not be nil")
|
||||
}
|
||||
var err error
|
||||
var session *model.Session
|
||||
var tokenValue string
|
||||
|
Reference in New Issue
Block a user