fix
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package ldap_lib
|
||||
|
||||
import "github.com/zeromicro/go-zero/core/logx"
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// 验证权限
|
||||
func (l *Ldap) VerifyAuthority(token, jwtSecret string) bool {
|
||||
func (l *Ldap) VerifyAuthority(r *http.Request, jwtSecret string) bool {
|
||||
token := r.Header.Get("Ldap-Authorization")
|
||||
info, err := l.ParseJwtToken(token, jwtSecret)
|
||||
if err != nil {
|
||||
logx.Error("解析token失败", err, "----token:", token)
|
||||
|
||||
Reference in New Issue
Block a user