mirror of
https://github.com/weloe/token-go.git
synced 2025-10-04 15:12:47 +08:00
feat: update ResponseToken method name
This commit is contained in:
@@ -203,7 +203,7 @@ func (e *Enforcer) LoginByModel(id string, loginModel *model.Login, ctx ctx.Cont
|
|||||||
}
|
}
|
||||||
|
|
||||||
// response token
|
// response token
|
||||||
err = e.responseToken(tokenValue, loginModel, ctx)
|
err = e.ResponseToken(tokenValue, loginModel, ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ func (e *Enforcer) createLoginToken(id string, loginModel *model.Login) (string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ResponseToken set token to cookie or header
|
// ResponseToken set token to cookie or header
|
||||||
func (e *Enforcer) responseToken(tokenValue string, loginModel *model.Login, ctx ctx.Context) error {
|
func (e *Enforcer) ResponseToken(tokenValue string, loginModel *model.Login, ctx ctx.Context) error {
|
||||||
if ctx == nil {
|
if ctx == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user