|
|
@@ -351,6 +351,7 @@ func (this *BaseController) Prepare() {
|
|
|
"/api/bankapi/get-icbc-gfgl2019-token",
|
|
|
"/api/iam/iamlogin",
|
|
|
}
|
|
|
+ fmt.Println("请求API-URL", this.Ctx.Input.URL())
|
|
|
for _, v := range urls {
|
|
|
//fmt.Println("**this.Ctx.Input.URL()**", this.Ctx.Input.URL())
|
|
|
if this.Ctx.Input.URL() == v {
|
|
|
@@ -423,7 +424,7 @@ func (this *BaseController) Prepare() {
|
|
|
this.User.Unit = usermodel.Unit
|
|
|
// this.User.Superior = usermodel.Superior
|
|
|
this.User.Roles = utils.ToStr(usermodel.Roleid)
|
|
|
- beego.Debug("User:", this.User)
|
|
|
+ //beego.Debug("User:", this.User)
|
|
|
}
|
|
|
|
|
|
if this.User == nil {
|
|
|
@@ -435,7 +436,7 @@ func (this *BaseController) Prepare() {
|
|
|
// ParseToken parse JWT token in http header.
|
|
|
func (this *BaseController) ParseToken() (*models.UserInfo, error) {
|
|
|
authString := this.Ctx.Input.Header("Authorization")
|
|
|
- beego.Debug("AuthString:", authString)
|
|
|
+ //beego.Debug("AuthString:", authString)
|
|
|
|
|
|
kv := strings.Split(authString, " ")
|
|
|
if len(kv) != 2 || kv[0] != "Bearer" {
|