| @@ -109,7 +109,7 @@ | ||
| 109 | 109 | ]; | 
| 110 | 110 | |
| 111 | 111 | $payload = $this->base64UrlEncode(json_encode($headers)) . '.' . | 
| 112 | - $this->base64UrlEncode(json_encode($claims)); | |
| 112 | + $this->base64UrlEncode(json_encode($claims)); | |
| 113 | 113 | |
| 114 | 114 | openssl_sign($payload, $signature, $key, OPENSSL_ALGO_SHA256); | 
| 115 | 115 | |
| @@ -30,11 +30,11 @@ | ||
| 30 | 30 | } | 
| 31 | 31 |  } else { | 
| 32 | 32 | $arr = $oauth->login($type); | 
| 33 | -     if (isset($arr['code']) && $arr['code'] == 0) { | |
| 34 | -         exit("<script language='javascript'>window.location.href='{$arr['url']}';</script>"); | |
| 35 | -     } elseif (isset($arr['code'])) { | |
| 36 | -         exit('登录接口返回:' . $arr['msg']); | |
| 37 | -     } else { | |
| 38 | -         exit('获取登录地址失败'); | |
| 39 | - } | |
| 33 | +        if (isset($arr['code']) && $arr['code'] == 0) { | |
| 34 | +            exit("<script language='javascript'>window.location.href='{$arr['url']}';</script>"); | |
| 35 | +        } elseif (isset($arr['code'])) { | |
| 36 | +            exit('登录接口返回:' . $arr['msg']); | |
| 37 | +        } else { | |
| 38 | +            exit('获取登录地址失败'); | |
| 39 | + } | |
| 40 | 40 | } |